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

This commit is contained in:
Ryan C. Gordon 2007-12-11 18:54:10 +00:00
parent be12a5bdc5
commit 9c8f5312de
2 changed files with 2 additions and 1 deletions

View File

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

View File

@ -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 */