Skip to content

Commit 8a632e0

Browse files
Merge pull request #985 from ashitsalesforce/master
Fix for an issue with a whitespace char in install path
2 parents cbf35bc + 64a7023 commit 8a632e0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: src/main/java/com/salesforce/dataloader/util/AppUtil.java

+5
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@ public static String getFullPathOfJar(Class<?> aClass) {
168168
if (codeSource != null && codeSource.getLocation() != null) {
169169
try {
170170
String jarFilePath = codeSource.getLocation().toURI().toString();
171+
try {
172+
jarFilePath = java.net.URLDecoder.decode(jarFilePath, StandardCharsets.UTF_8.name());
173+
} catch (UnsupportedEncodingException e) {
174+
// ignore
175+
}
171176
return jarFilePath.substring(jarFilePath.indexOf('/'));
172177
} catch (URISyntaxException e) {
173178
return null;

0 commit comments

Comments
 (0)