* 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:
parent
4c8f3064a2
commit
598d021972
|
@ -159,7 +159,7 @@ normalize_entry_path(const char *path, string &normalizedPath)
|
|||
}
|
||||
|
||||
// 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);
|
||||
|
||||
// normalize the dir path
|
||||
|
@ -514,7 +514,7 @@ open_file(const char *path, int openMode, int perms)
|
|||
}
|
||||
|
||||
// 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));
|
||||
|
||||
return add_descriptor(descriptor);
|
||||
|
|
Loading…
Reference in New Issue