Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Kaegi2010-01-25 11:06:24 -0500
committerSimon Kaegi2010-01-25 11:06:24 -0500
commita347364dc7d78e2b77251c8d9fba8e05bbf8444a (patch)
tree707da757f0018a7014771024320e00a6520bf321 /bundles/org.eclipse.equinox.p2.touchpoint.eclipse
parente4b5472f36bad445641e6e5abb40743d094646bc (diff)
downloadrt.equinox.p2-a347364dc7d78e2b77251c8d9fba8e05bbf8444a.tar.gz
rt.equinox.p2-a347364dc7d78e2b77251c8d9fba8e05bbf8444a.tar.xz
rt.equinox.p2-a347364dc7d78e2b77251c8d9fba8e05bbf8444a.zip
Bug 274647 [touchpoint] Make chmod and ln actions on Windows a no op
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.touchpoint.eclipse')
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ChmodAction.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/LinkAction.java3
2 files changed, 6 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ChmodAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ChmodAction.java
index bc1d51d80..6b49224f5 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ChmodAction.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ChmodAction.java
@@ -24,6 +24,7 @@ import org.eclipse.osgi.util.NLS;
// We should just use the native touchpoint copy when we have a replacement for the use of @artifact in parameters
public class ChmodAction extends ProvisioningAction {
private static final String ACTION_CHMOD = "chmod"; //$NON-NLS-1$
+ private static final boolean WINDOWS = java.io.File.separatorChar == '\\';
public IStatus execute(Map<String, Object> parameters) {
String targetDir = (String) parameters.get(ActionConstants.PARM_TARGET_DIR);
@@ -85,6 +86,8 @@ public class ChmodAction extends ProvisioningAction {
}
public void chmod(String targetDir, String targetFile, String perms, String[] options) {
+ if (WINDOWS)
+ return;
Runtime r = Runtime.getRuntime();
try {
// Note: 3 is from chmod, permissions, and target
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/LinkAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/LinkAction.java
index 708d8bf69..fa8825e88 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/LinkAction.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/LinkAction.java
@@ -21,6 +21,7 @@ import org.eclipse.osgi.util.NLS;
//We should just use the native touchpoint copy when we have a replacement for the use of @artifact in parameters
public class LinkAction extends ProvisioningAction {
public static final String ID = "ln"; //$NON-NLS-1$
+ private static final boolean WINDOWS = java.io.File.separatorChar == '\\';
public IStatus execute(Map<String, Object> parameters) {
String targetDir = (String) parameters.get(ActionConstants.PARM_TARGET_DIR);
@@ -67,6 +68,8 @@ public class LinkAction extends ProvisioningAction {
* @param force if overwrite of existing file should be performed.
*/
private void ln(String targetDir, String linkTarget, String linkName, boolean force) {
+ if (WINDOWS)
+ return;
Runtime r = Runtime.getRuntime();
try {

Back to the top