From 1aa0511f7b00a4ea2e1b60459693816e10dfed3c Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 11 Dec 2007 18:54:10 +0000 Subject: [PATCH] Fixed wrong dir test in Windows code in both 1.0 and 1.1 (thanks, Dennis!). --- CHANGELOG.txt | 1 + platform/windows.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index cf40e996..eb3f44a6 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -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!). diff --git a/platform/windows.c b/platform/windows.c index 7cf53e25..40577625 100644 --- a/platform/windows.c +++ b/platform/windows.c @@ -1208,7 +1208,7 @@ int __PHYSFS_platformClose(void *opaque) 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 */