This should finally fix the spurious "No such file or directory" errors
reported from our build tools under Linux. As it seems Linux does not translate dirent::d_ino for mount points (BeOS and Haiku do), which caused us not to find a mount point entry in its parent directory. Thanks to Vampyre for the hint. Fixes bugs #73 and #76. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15726 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -315,9 +315,11 @@ find_dir_entry(DIR *dir, const char *path, NodeRef ref, string &name, bool skipD
|
|||||||
if ((!skipDot && strcmp(entry->d_name, ".") == 0)
|
if ((!skipDot && strcmp(entry->d_name, ".") == 0)
|
||||||
|| strcmp(entry->d_name, "..") == 0) {
|
|| strcmp(entry->d_name, "..") == 0) {
|
||||||
// skip "." and ".."
|
// skip "." and ".."
|
||||||
} else if (entry->d_ino == ref.node) {
|
} else /*if (entry->d_ino == ref.node)*/ {
|
||||||
|
// Note: Linux doesn't seem to translate dirent::d_ino of
|
||||||
|
// mount points. Thus we always have to lstat().
|
||||||
// We also need to compare the device, which is generally not
|
// We also need to compare the device, which is generally not
|
||||||
// included in the direct structure. Hence we lstat().
|
// included in the dirent structure. Hence we lstat().
|
||||||
string entryPath(path);
|
string entryPath(path);
|
||||||
entryPath += '/';
|
entryPath += '/';
|
||||||
entryPath += entry->d_name;
|
entryPath += entry->d_name;
|
||||||
|
|||||||
Reference in New Issue
Block a user