nfs4: Fix mounting server's root directory

This commit is contained in:
Pawel Dziepak
2012-08-09 18:09:56 +02:00
parent 2431c4521c
commit 8afd81bae2
2 changed files with 6 additions and 6 deletions
@@ -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);
}