Skip to content

Commit

Permalink
Merge pull request #985 from ashitsalesforce/master
Browse files Browse the repository at this point in the history
Fix for an issue with a whitespace char in install path
  • Loading branch information
ashitsalesforce authored Feb 14, 2024
2 parents cbf35bc + 64a7023 commit 8a632e0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/com/salesforce/dataloader/util/AppUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ public static String getFullPathOfJar(Class<?> aClass) {
if (codeSource != null && codeSource.getLocation() != null) {
try {
String jarFilePath = codeSource.getLocation().toURI().toString();
try {
jarFilePath = java.net.URLDecoder.decode(jarFilePath, StandardCharsets.UTF_8.name());
} catch (UnsupportedEncodingException e) {
// ignore
}
return jarFilePath.substring(jarFilePath.indexOf('/'));
} catch (URISyntaxException e) {
return null;
Expand Down

0 comments on commit 8a632e0

Please sign in to comment.