diff options
| author | Travis Howell | 2006-05-03 13:06:22 +0000 | 
|---|---|---|
| committer | Travis Howell | 2006-05-03 13:06:22 +0000 | 
| commit | e4e7ba1d7a1f2a22ccf359adb0f9b248b9ea36f7 (patch) | |
| tree | 0037bad3c426080f4b9283a30a92e5a51e601e95 /backends/fs | |
| parent | d84f744e2df9f08146e87c0dbc90e51e8b6ab319 (diff) | |
| download | scummvm-rg350-e4e7ba1d7a1f2a22ccf359adb0f9b248b9ea36f7.tar.gz scummvm-rg350-e4e7ba1d7a1f2a22ccf359adb0f9b248b9ea36f7.tar.bz2 scummvm-rg350-e4e7ba1d7a1f2a22ccf359adb0f9b248b9ea36f7.zip  | |
Make sure AbstractFilesystemNode::child() only returns a directory in Windows
svn-id: r22306
Diffstat (limited to 'backends/fs')
| -rw-r--r-- | backends/fs/windows/windows-fs.cpp | 4 | 
1 files 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);  | 
