Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Grunberg2016-12-13 16:30:43 -0500
committerRoland Grunberg2017-01-09 16:31:39 -0500
commitbcfacf1b03f5defe4d15ce6c139c0a43e9e31fc0 (patch)
treeda4b4fb84bc79ba69c80319b1b2698233345ba18 /bundles/org.eclipse.equinox.p2.engine/src
parent4fd70f530ffa58e5c2a8ef4214109dfcfb8d6c18 (diff)
downloadrt.equinox.p2-bcfacf1b03f5defe4d15ce6c139c0a43e9e31fc0.tar.gz
rt.equinox.p2-bcfacf1b03f5defe4d15ce6c139c0a43e9e31fc0.tar.xz
rt.equinox.p2-bcfacf1b03f5defe4d15ce6c139c0a43e9e31fc0.zip
Bug 508905: Change File.canWrite to Files.isWritable for p2 Droplets.
For compatibility with Windows, use java.nio.Files.isWritable(Path) instead of java.io.File.canWrite(). This is due to the fact that canWrite always returns true for directories on Windows. - Enable all tests disabled on Windows by 416b782 - Introduce reallyReadOnly/removeReallyReadonly functions that operate recursively on a directory (like chmod -R on linux) since certain test cases require this Change-Id: I615dfdef60e4abd23c34602bd324c307325e00d4 Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.engine/src')
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineActivator.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineActivator.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineActivator.java
index 5fc0e73b5..8106718c8 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineActivator.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineActivator.java
@@ -14,6 +14,7 @@ package org.eclipse.equinox.internal.p2.engine;
import java.io.*;
import java.net.URI;
import java.net.URISyntaxException;
+import java.nio.file.Files;
import java.util.*;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -135,7 +136,7 @@ public class EngineActivator implements BundleActivator {
}
if (extension.isDirectory()) {
- if (extension.canWrite()) {
+ if (Files.isWritable(extension.toPath())) {
synchronized (reportedExtensions) {
if (!reportedExtensions.contains(extension)) {
reportedExtensions.add(extension);

Back to the top