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)
|
if (pathEnd != NULL)
|
||||||
*pathEnd = '\0';
|
*pathEnd = '\0';
|
||||||
|
|
||||||
req.LookUp(pathStart);
|
if (pathEnd != pathStart) {
|
||||||
|
req.LookUp(pathStart);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
|
||||||
if (pathEnd != NULL && pathEnd[1] != '\0')
|
if (pathEnd != NULL && pathEnd[1] != '\0')
|
||||||
pathStart = pathEnd + 1;
|
pathStart = pathEnd + 1;
|
||||||
else
|
else
|
||||||
pathStart = NULL;
|
pathStart = NULL;
|
||||||
|
|
||||||
count++;
|
|
||||||
}
|
}
|
||||||
free(path);
|
free(path);
|
||||||
|
|
||||||
|
|||||||
@@ -268,9 +268,8 @@ Inode::ReadDir(void* _buffer, uint32 size, uint32* _count,
|
|||||||
struct dirent* de = reinterpret_cast<dirent*>(buffer + pos);
|
struct dirent* de = reinterpret_cast<dirent*>(buffer + pos);
|
||||||
|
|
||||||
status_t result;
|
status_t result;
|
||||||
if (strcmp(fInfo.fName, "/"))
|
result = ReadDirUp(de, pos, size);
|
||||||
result = ReadDirUp(de, pos, size);
|
if (result == B_ENTRY_NOT_FOUND) {
|
||||||
else {
|
|
||||||
result = FillDirEntry(de, FileIdToInoT(fInfo.fFileId), "..", pos,
|
result = FillDirEntry(de, FileIdToInoT(fInfo.fFileId), "..", pos,
|
||||||
size);
|
size);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user