From 880de4501c947bc25c5860ebfcd8eb79677dafde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 26 Nov 2009 16:04:23 +0000 Subject: [PATCH] * Minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34287 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/build/libroot/fs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/build/libroot/fs.cpp b/src/build/libroot/fs.cpp index 0ed260befa..35351ae01c 100644 --- a/src/build/libroot/fs.cpp +++ b/src/build/libroot/fs.cpp @@ -3,6 +3,7 @@ * Distributed under the terms of the MIT License. */ + #include #include "fs_impl.h" @@ -515,7 +516,7 @@ open_file(const char *path, int openMode, int perms) } 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 // normalize path first string normalizedPath; @@ -524,7 +525,6 @@ open_file(const char *path, int openMode, int perms) return error; descriptor = new SymlinkDescriptor(normalizedPath.c_str()); - } else { // open the file openMode &= ~O_NOTRAVERSE;