Merge pull request #417 from ReadyTalk/repatch-windows-file-delete

repatch windows file delete
This commit is contained in:
Joel Dice 2015-03-06 15:39:20 -07:00
commit 795604bbc4

View File

@ -389,7 +389,7 @@ Java_java_io_File_delete(JNIEnv* e, jclass, jstring path)
int r;
if (chars) {
#ifdef PLATFORM_WINDOWS
if (GetFileAttributes(chars) == FILE_ATTRIBUTE_DIRECTORY) {
if (GetFileAttributes(chars) & FILE_ATTRIBUTE_DIRECTORY) {
r = !RemoveDirectory(chars);
} else {
r = REMOVE(chars);