Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault (Ericsson)2013-04-16 20:53:28 +0000
committerPascal Rapicault2013-04-16 20:53:28 +0000
commit40aee9502a0a968524f37fcc3cd7b5ad916d4ea2 (patch)
treeb6c2dc57e718578f7cedbdd481cda8e524fcb70c /bundles/org.eclipse.equinox.p2.tests
parent7d3a43be3a4fbb04bf9a22453a46af1633d09c1a (diff)
downloadrt.equinox.p2-40aee9502a0a968524f37fcc3cd7b5ad916d4ea2.tar.gz
rt.equinox.p2-40aee9502a0a968524f37fcc3cd7b5ad916d4ea2.tar.xz
rt.equinox.p2-40aee9502a0a968524f37fcc3cd7b5ad916d4ea2.zip
Set read only flags using AclEntry only on windows
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/AbstractSharedInstallTest.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/AbstractSharedInstallTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/AbstractSharedInstallTest.java
index f5bdec022..ede8a439e 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/AbstractSharedInstallTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/AbstractSharedInstallTest.java
@@ -14,6 +14,7 @@ import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.attribute.*;
import java.util.*;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry;
import org.eclipse.equinox.p2.tests.reconciler.dropins.AbstractReconcilerTest;
@@ -182,6 +183,9 @@ public abstract class AbstractSharedInstallTest extends AbstractReconcilerTest {
}
protected void reallyReadOnly(File folder) {
+ if (!Platform.getOS().equals(Platform.OS_WIN32))
+ return;
+
try {
Path path = folder.toPath();
AclFileAttributeView view = Files.getFileAttributeView(path, AclFileAttributeView.class);
@@ -191,7 +195,7 @@ public abstract class AbstractSharedInstallTest extends AbstractReconcilerTest {
acl.add(0, newEntry); // insert before any DENY entries
view.setAcl(acl);
} catch (IOException e) {
- fail("oh shit");
+ fail("can't mark the folder " + folder + " read-only.");
}
}

Back to the top