summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault (Ericsson)2013-04-16 16:53:28 (EDT)
committerPascal Rapicault2013-04-16 16:53:28 (EDT)
commit40aee9502a0a968524f37fcc3cd7b5ad916d4ea2 (patch)
treeb6c2dc57e718578f7cedbdd481cda8e524fcb70c
parent7d3a43be3a4fbb04bf9a22453a46af1633d09c1a (diff)
downloadrt.equinox.p2-40aee9502a0a968524f37fcc3cd7b5ad916d4ea2.zip
rt.equinox.p2-40aee9502a0a968524f37fcc3cd7b5ad916d4ea2.tar.gz
rt.equinox.p2-40aee9502a0a968524f37fcc3cd7b5ad916d4ea2.tar.bz2
Set read only flags using AclEntry only on windows
-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 f5bdec0..ede8a43 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.");
}
}