* Fixed bug in the code normalizing entry paths, causing e.g. broken
symlinks to be not openable. * When _kern_open() created a new file, invalid stat data were accessed. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22176 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -159,7 +159,7 @@ normalize_entry_path(const char *path, string &normalizedPath)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// catch special case: no leaf, or leaf is a directory
|
// catch special case: no leaf, or leaf is a directory
|
||||||
if (!leafName || strcmp(leafName, ".") == 0 || strcmp(leafName, ".."))
|
if (!leafName || strcmp(leafName, ".") == 0 || strcmp(leafName, "..") == 0)
|
||||||
return normalize_dir_path(path, normalizedPath);
|
return normalize_dir_path(path, normalizedPath);
|
||||||
|
|
||||||
// normalize the dir path
|
// normalize the dir path
|
||||||
@@ -514,7 +514,7 @@ open_file(const char *path, int openMode, int perms)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// cache path, if this is a directory
|
// cache path, if this is a directory
|
||||||
if (S_ISDIR(st.st_mode))
|
if (exists && S_ISDIR(st.st_mode))
|
||||||
add_dir_path(path, NodeRef(st));
|
add_dir_path(path, NodeRef(st));
|
||||||
|
|
||||||
return add_descriptor(descriptor);
|
return add_descriptor(descriptor);
|
||||||
|
|||||||
Reference in New Issue
Block a user