[haiku-commits] haiku: hrev44074 - src/apps/debugger/files

  • From: anevilyak@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 28 Apr 2012 21:46:58 +0200 (CEST)

hrev44074 adds 1 changeset to branch 'master'
old head: 1f5facdbe7e25dc9618ec413eda01adf82d763f2
new head: 96493c29bcddabb36766c0ec90fa31dd1672e665

----------------------------------------------------------------------------

96493c2: Handle gcc2 quirks with paths.
  
  When asked to build via a relative path (i.e. from within a generated subdir),
  gcc2 was generating a compilation directory attribute pointing to the 
generated
  subdirectory, as well as entering the actual filename attribute as the full
  absolute path to the file. This wasn't checked for, leading to the issue
  described in ticket #8498. gcc4 does not appear to have the same behavior,
  it generates a relative path + filename in all cases.

                                      [ Rene Gollent <anevilyak@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev44074
Commit:      96493c29bcddabb36766c0ec90fa31dd1672e665
URL:         http://cgit.haiku-os.org/haiku/commit/?id=96493c2
Author:      Rene Gollent <anevilyak@xxxxxxxxx>
Date:        Sat Apr 28 19:42:53 2012 UTC

Ticket:      https://dev.haiku-os.org/ticket/8498

----------------------------------------------------------------------------

1 file changed, 4 insertions(+), 4 deletions(-)
src/apps/debugger/files/FileManager.cpp |    8 ++++----

----------------------------------------------------------------------------

diff --git a/src/apps/debugger/files/FileManager.cpp 
b/src/apps/debugger/files/FileManager.cpp
index 10f989c..aaa78f2 100644
--- a/src/apps/debugger/files/FileManager.cpp
+++ b/src/apps/debugger/files/FileManager.cpp
@@ -1,6 +1,6 @@
 /*
  * Copyright 2009, Ingo Weinhold, ingo_weinhold@xxxxxxx
- * Copyright 2011, Rene Gollent, rene@xxxxxxxxxxxx
+ * Copyright 2011-2012, Rene Gollent, rene@xxxxxxxxxxxx
  * Distributed under the terms of the MIT License.
  */
 
@@ -128,7 +128,7 @@ public:
        LocatableFile* GetFile(const BString& directoryPath,
                const BString& relativePath)
        {
-               if (directoryPath.Length() == 0)
+               if (directoryPath.Length() == 0 || relativePath[0] == '/')
                        return GetFile(relativePath);
                return GetFile(BString(directoryPath) << '/' << relativePath);
        }
@@ -314,7 +314,7 @@ private:
                        directory->ReleaseReference();
                        return NULL;
                }
-               
+
                directory->AddEntry(file);
 
                fEntries.Insert(file);
@@ -366,7 +366,7 @@ private:
                        if 
(parentDirectory->GetLocatedPath(locatedDirectoryPath))
                                _LocateEntryInParentDir(directory, 
locatedDirectoryPath, true);
                }
-               
+
                if (parentDirectory != NULL)
                        parentDirectory->AddEntry(directory);
 


Other related posts:

  • » [haiku-commits] haiku: hrev44074 - src/apps/debugger/files - anevilyak