From 977d7846f5236b59c6301b10925f7f8bd0edbcb9 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Fri, 25 Apr 2008 21:17:45 +0000 Subject: [PATCH] * Unbroke Inode::IsDirectory() again, according to Axel's suggestion. * Simplified Inode::IsContainer(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25165 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/file_systems/bfs/Inode.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/add-ons/kernel/file_systems/bfs/Inode.h b/src/add-ons/kernel/file_systems/bfs/Inode.h index c0d7c80f10..d5adfd83cb 100644 --- a/src/add-ons/kernel/file_systems/bfs/Inode.h +++ b/src/add-ons/kernel/file_systems/bfs/Inode.h @@ -50,9 +50,10 @@ class Inode { status_t WriteBack(Transaction &transaction); bool IsContainer() const - { return (Mode() & (S_INDEX_DIR | S_ATTR_DIR)) || S_ISDIR(Mode()); } - bool IsDirectory() const { return S_ISDIR(Mode()); } + bool IsDirectory() const + { return (Mode() & (S_INDEX_DIR | S_ATTR_DIR | S_IFDIR)) + == S_IFDIR; } bool IsIndex() const { return (Mode() & (S_INDEX_DIR | 0777)) == S_INDEX_DIR; } // that's a stupid check, but AFAIK the only possible method...