If the entry leaf name is "." or ".." we need to resolve it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24860 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -899,6 +899,16 @@ BEntry::set(int dirFD, const char *path, bool traverse)
|
|||||||
return dirFD;
|
return dirFD;
|
||||||
fdCloser.SetTo(dirFD);
|
fdCloser.SetTo(dirFD);
|
||||||
}
|
}
|
||||||
|
} else if (strcmp(leafName, ".") == 0
|
||||||
|
|| strcmp(leafName, "..") == 0) {
|
||||||
|
// We have to resolve this to get the entry name. Just open
|
||||||
|
// the dir and let the next iteration deal with it.
|
||||||
|
dirFD = _kern_open_dir(-1, path);
|
||||||
|
if (dirFD < 0)
|
||||||
|
return dirFD;
|
||||||
|
fdCloser.SetTo(dirFD);
|
||||||
|
path = NULL;
|
||||||
|
continue;
|
||||||
} else {
|
} else {
|
||||||
int parentFD = _kern_open_dir(dirFD, dirPath);
|
int parentFD = _kern_open_dir(dirFD, dirPath);
|
||||||
if (parentFD < 0)
|
if (parentFD < 0)
|
||||||
|
|||||||
@@ -901,6 +901,16 @@ BEntry::set(int dirFD, const char *path, bool traverse)
|
|||||||
return dirFD;
|
return dirFD;
|
||||||
fdCloser.SetTo(dirFD);
|
fdCloser.SetTo(dirFD);
|
||||||
}
|
}
|
||||||
|
} else if (strcmp(leafName, ".") == 0
|
||||||
|
|| strcmp(leafName, "..") == 0) {
|
||||||
|
// We have to resolve this to get the entry name. Just open
|
||||||
|
// the dir and let the next iteration deal with it.
|
||||||
|
dirFD = _kern_open_dir(-1, path);
|
||||||
|
if (dirFD < 0)
|
||||||
|
return dirFD;
|
||||||
|
fdCloser.SetTo(dirFD);
|
||||||
|
path = NULL;
|
||||||
|
continue;
|
||||||
} else {
|
} else {
|
||||||
int parentFD = _kern_open_dir(dirFD, dirPath);
|
int parentFD = _kern_open_dir(dirFD, dirPath);
|
||||||
if (parentFD < 0)
|
if (parentFD < 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user