Fixed wrong dir test in Windows code in both 1.0 and 1.1 (thanks, Dennis!). stable-1.0
authorRyan C. Gordon <icculus@icculus.org>
Tue, 11 Dec 2007 18:54:10 +0000
branchstable-1.0
changeset 909 75b1c65b30c5
parent 907 387bd51da4b1
child 911 ba7133068da7
Fixed wrong dir test in Windows code in both 1.0 and 1.1 (thanks, Dennis!).
CHANGELOG
platform/win32.c
--- a/CHANGELOG	Mon Oct 01 15:47:40 2007 +0000
+++ b/CHANGELOG	Tue Dec 11 18:54:10 2007 +0000
@@ -4,6 +4,7 @@
 
 -- stuff in the stable-1.0 branch, backported from 2.0.0 dev branch, etc ---
 
+12112007 - Fixed incorrect directory test in Windows code (thanks, Dennis!).
 10012007 - More mingw32 fixes.
 07122007 - Maybe fixed compile on mingw32.
 07112007 - Fixed crash on zero-byte read/write (thanks, Ensiform!).
--- a/platform/win32.c	Mon Oct 01 15:47:40 2007 +0000
+++ b/platform/win32.c	Tue Dec 11 18:54:10 2007 +0000
@@ -970,7 +970,7 @@
 int __PHYSFS_platformDelete(const char *path)
 {
     /* If filename is a folder */
-    if (GetFileAttributes(path) == FILE_ATTRIBUTE_DIRECTORY)
+    if (GetFileAttributes(path) & FILE_ATTRIBUTE_DIRECTORY)
     {
         BAIL_IF_MACRO(!RemoveDirectory(path), win32strerror(), 0);
     } /* if */