nfs4: Fix mounting server's root directory
This commit is contained in:
@@ -30,14 +30,15 @@ FileInfo::ParsePath(RequestBuilder& req, uint32& count, const char* _path)
|
||||
if (pathEnd != NULL)
|
||||
*pathEnd = '\0';
|
||||
|
||||
req.LookUp(pathStart);
|
||||
if (pathEnd != pathStart) {
|
||||
req.LookUp(pathStart);
|
||||
count++;
|
||||
}
|
||||
|
||||
if (pathEnd != NULL && pathEnd[1] != '\0')
|
||||
pathStart = pathEnd + 1;
|
||||
else
|
||||
pathStart = NULL;
|
||||
|
||||
count++;
|
||||
}
|
||||
free(path);
|
||||
|
||||
|
||||
@@ -268,9 +268,8 @@ Inode::ReadDir(void* _buffer, uint32 size, uint32* _count,
|
||||
struct dirent* de = reinterpret_cast<dirent*>(buffer + pos);
|
||||
|
||||
status_t result;
|
||||
if (strcmp(fInfo.fName, "/"))
|
||||
result = ReadDirUp(de, pos, size);
|
||||
else {
|
||||
result = ReadDirUp(de, pos, size);
|
||||
if (result == B_ENTRY_NOT_FOUND) {
|
||||
result = FillDirEntry(de, FileIdToInoT(fInfo.fFileId), "..", pos,
|
||||
size);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user