Fixed wrong dir test in Windows code in both 1.0 and 1.1 (thanks, Dennis!).
authorRyan C. Gordon <icculus@icculus.org>
Tue, 11 Dec 2007 18:54:10 +0000
changeset 910 0860638fad95
parent 908 662ca06432ef
child 912 a68ff7aaf9a3
Fixed wrong dir test in Windows code in both 1.0 and 1.1 (thanks, Dennis!).
CHANGELOG.txt
platform/windows.c
--- a/CHANGELOG.txt	Mon Oct 01 15:47:40 2007 +0000
+++ b/CHANGELOG.txt	Tue Dec 11 18:54:10 2007 +0000
@@ -2,6 +2,7 @@
  * CHANGELOG.
  */
 
+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/windows.c	Mon Oct 01 15:47:40 2007 +0000
+++ b/platform/windows.c	Tue Dec 11 18:54:10 2007 +0000
@@ -1208,7 +1208,7 @@
 static int doPlatformDelete(LPWSTR wpath)
 {
     /* If filename is a folder */
-    if (pGetFileAttributesW(wpath) == FILE_ATTRIBUTE_DIRECTORY)
+    if (pGetFileAttributesW(wpath) & FILE_ATTRIBUTE_DIRECTORY)
     {
         BAIL_IF_MACRO(!pRemoveDirectoryW(wpath), winApiStrError(), 0);
     } /* if */