mirror of
https://review.haiku-os.org/haiku
synced 2025-02-23 05:58:31 +01:00
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:
parent
54045c2e44
commit
5822847842
@ -899,6 +899,16 @@ BEntry::set(int dirFD, const char *path, bool traverse)
|
||||
return 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 {
|
||||
int parentFD = _kern_open_dir(dirFD, dirPath);
|
||||
if (parentFD < 0)
|
||||
|
@ -901,6 +901,16 @@ BEntry::set(int dirFD, const char *path, bool traverse)
|
||||
return 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 {
|
||||
int parentFD = _kern_open_dir(dirFD, dirPath);
|
||||
if (parentFD < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user