* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34287 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <BeOSBuildCompatibility.h>
|
#include <BeOSBuildCompatibility.h>
|
||||||
|
|
||||||
#include "fs_impl.h"
|
#include "fs_impl.h"
|
||||||
@@ -515,7 +516,7 @@ open_file(const char *path, int openMode, int perms)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Descriptor *descriptor;
|
Descriptor *descriptor;
|
||||||
if (exists && S_ISLNK(st.st_mode) && (openMode & O_NOTRAVERSE)) {
|
if (exists && S_ISLNK(st.st_mode) && (openMode & O_NOTRAVERSE) != 0) {
|
||||||
// a symlink not to be followed: create a special descriptor
|
// a symlink not to be followed: create a special descriptor
|
||||||
// normalize path first
|
// normalize path first
|
||||||
string normalizedPath;
|
string normalizedPath;
|
||||||
@@ -524,7 +525,6 @@ open_file(const char *path, int openMode, int perms)
|
|||||||
return error;
|
return error;
|
||||||
|
|
||||||
descriptor = new SymlinkDescriptor(normalizedPath.c_str());
|
descriptor = new SymlinkDescriptor(normalizedPath.c_str());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// open the file
|
// open the file
|
||||||
openMode &= ~O_NOTRAVERSE;
|
openMode &= ~O_NOTRAVERSE;
|
||||||
|
|||||||
Reference in New Issue
Block a user