aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2013-07-07 05:27:31 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2013-07-07 05:27:31 +0200
commit5326cfa8e80a55c056f497894288924022c9bbd7 (patch)
tree506bb9b1675d6c019a9af6d0a05134a4fec53508 /src
parent420e0dcb53654f41d0f79b004d6c750414e6ba7a (diff)
parente531b1f49948dc075586151608c01c80863af67e (diff)
downloadlombok-5326cfa8e80a55c056f497894288924022c9bbd7.tar.gz
lombok-5326cfa8e80a55c056f497894288924022c9bbd7.tar.bz2
lombok-5326cfa8e80a55c056f497894288924022c9bbd7.zip
Merge branch 'master' of github.com:rzwitserloot/lombok
Diffstat (limited to 'src')
-rw-r--r--src/installer/lombok/installer/IdeLocation.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/installer/lombok/installer/IdeLocation.java b/src/installer/lombok/installer/IdeLocation.java
index a15f2ac9..4d28fb90 100644
--- a/src/installer/lombok/installer/IdeLocation.java
+++ b/src/installer/lombok/installer/IdeLocation.java
@@ -25,6 +25,7 @@ import java.io.File;
import java.io.IOException;
import java.net.URL;
+import lombok.installer.eclipse.EclipseFinder;
import lombok.patcher.inject.LiveInjector;
/**
@@ -66,11 +67,12 @@ public abstract class IdeLocation {
}
private static final String LEGAL_PATH_CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_/";
+ private static final String LEGAL_PATH_CHARS_WINDOWS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_/:\\ ";
public static String escapePath(String path) {
StringBuilder out = new StringBuilder();
-
+ String legalChars = IdeFinder.getOS() == EclipseFinder.OS.UNIX ? LEGAL_PATH_CHARS : LEGAL_PATH_CHARS_WINDOWS;
for (char c : path.toCharArray()) {
- if (LEGAL_PATH_CHARS.indexOf(c) == -1) out.append('\\');
+ if (legalChars.indexOf(c) == -1) out.append('\\');
out.append(c);
}
return out.toString();