Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.core.filesystem; singleton:=true
Bundle-Version: 1.11.300.qualifier
Bundle-Version: 1.11.400.qualifier
Bundle-Localization: plugin
Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.18.0,4.0.0)",
org.eclipse.equinox.registry;bundle-version="[3.2.0,4.0.0)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Platform.OS;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.osgi.util.NLS;
Expand Down Expand Up @@ -314,6 +315,12 @@ private IStatus internalDelete(File target, InfiniteProgress infMonitor, Executo
} catch (AccessDeniedException e) {
// If the file is read only, it can't be deleted via Files.deleteIfExists()
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=500306
// Since Java 25, just calling File#delete() is not sufficient anymore on Windows
// but the read-only state has to be cleared explicitly,
// see https://bugs.openjdk.org/browse/JDK-8355954
if (OS.isWindows()) {
target.setWritable(true);
}
if (target.delete()) {
infMonitor.worked();
return Status.OK_STATUS;
Expand Down
Loading