Skip to content

Conversation

HeikoKlare
Copy link
Contributor

With Java 25, the behavior of File#delete() has been changed for read-only files on Windows. Previously, the operation also removed read-only files whereas now the operation fails in that case. LocalFile#delete() depends on the preexisting behavior. It ensures that read-only files are also deleted.

In order to preserve the behavior with Java 25, this change makes LocalFile#delete() explicitly remove the read-only attribute when deleting a read-only file on WIndows.

Fixes #2178

…pse-platform#2178

With Java 25, the behavior of File#delete() has been changed for
read-only files on Windows. Previously, the operation also removed
read-only files whereas now the operation fails in that case.
LocalFile#delete() depends on the preexisting behavior. It ensures that
read-only files are also deleted.

In order to preserve the behavior with Java 25, this change makes
LocalFile#delete() explicitly remove the read-only attribute when
deleting a read-only file on WIndows.

Fixes eclipse-platform#2178
@eclipse-platform-bot
Copy link
Contributor

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

resources/bundles/org.eclipse.core.filesystem/META-INF/MANIFEST.MF

An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch.

Git patch
From dfadbdf70f55cf953603686e9d55eb8838e9219f Mon Sep 17 00:00:00 2001
From: Eclipse Platform Bot <platform-bot@eclipse.org>
Date: Wed, 1 Oct 2025 13:33:27 +0000
Subject: [PATCH] Version bump(s) for 4.38 stream


diff --git a/resources/bundles/org.eclipse.core.filesystem/META-INF/MANIFEST.MF b/resources/bundles/org.eclipse.core.filesystem/META-INF/MANIFEST.MF
index 62198db331..90b43287c9 100644
--- a/resources/bundles/org.eclipse.core.filesystem/META-INF/MANIFEST.MF
+++ b/resources/bundles/org.eclipse.core.filesystem/META-INF/MANIFEST.MF
@@ -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)",
-- 
2.51.0

Further information are available in Common Build Issues - Missing version increments.

Copy link
Contributor

github-actions bot commented Oct 1, 2025

Test Results

 1 947 files  ±0   1 947 suites  ±0   1h 38m 41s ⏱️ + 1m 7s
 4 720 tests ±0   4 696 ✅ ±0   24 💤 ±0  0 ❌ ±0 
14 160 runs  ±0  13 993 ✅ ±0  167 💤 ±0  0 ❌ ±0 

Results for commit 51ba044. ± Comparison against base commit 30180a8.

@HeikoKlare HeikoKlare merged commit 9b49df5 into eclipse-platform:master Oct 1, 2025
18 checks passed
@HeikoKlare HeikoKlare deleted the issue-2178 branch October 1, 2025 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Win32] Deletion of read-only files not working with Java 25
3 participants