diff --git a/classpath/java-io.cpp b/classpath/java-io.cpp index 8df96ee01e..fb34b2d99a 100644 --- a/classpath/java-io.cpp +++ b/classpath/java-io.cpp @@ -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);