Sfoglia il codice sorgente

Fixed wrong dir test in Windows code in both 1.0 and 1.1 (thanks, Dennis!).

Ryan C. Gordon 18 anni fa
parent
commit
9c8f5312de
2 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 1 0
      CHANGELOG
  2. 1 1
      platform/win32.c

+ 1 - 0
CHANGELOG

@@ -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!).

+ 1 - 1
platform/win32.c

@@ -970,7 +970,7 @@ int __PHYSFS_platformClose(void *opaque)
 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 */