From e4e7ba1d7a1f2a22ccf359adb0f9b248b9ea36f7 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Wed, 3 May 2006 13:06:22 +0000 Subject: Make sure AbstractFilesystemNode::child() only returns a directory in Windows svn-id: r22306 --- backends/fs/windows/windows-fs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backends/fs/windows/windows-fs.cpp b/backends/fs/windows/windows-fs.cpp index e1e9da12ab..0f01fda280 100644 --- a/backends/fs/windows/windows-fs.cpp +++ b/backends/fs/windows/windows-fs.cpp @@ -153,7 +153,7 @@ WindowsFilesystemNode::WindowsFilesystemNode(const String &p) { // Check whether it is a directory, and whether the file actually exists DWORD fileAttribs = GetFileAttributes(toUnicode(_path.c_str())); - if (fileAttribs == 0xffffffff) { + if (fileAttribs == INVALID_FILE_ATTRIBUTES) { _isValid = false; _isDirectory = false; } else { @@ -239,7 +239,7 @@ AbstractFilesystemNode *WindowsFilesystemNode::child(const String &name) const { // Check whether the directory actually exists DWORD fileAttribs = GetFileAttributes(toUnicode(newPath.c_str())); - if (fileAttribs == 0xffffffff) + if (fileAttribs != FILE_ATTRIBUTE_DIRECTORY || fileAttribs == INVALID_FILE_ATTRIBUTES) return 0; WindowsFilesystemNode *p = new WindowsFilesystemNode(newPath); -- cgit v1.2.3