Skip to content

Commit

Permalink
Written much cleaner per edvin's comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
TurekBot committed Dec 20, 2018
1 parent d642678 commit 2283f39
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/main/java/fxlauncher/AbstractLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,10 @@ protected boolean syncFiles() throws Exception {
Files.createDirectories(target.getParent());

URI uri;
if (!manifest.uri.getPath().endsWith("/")) {
// We avoid using uri.resolve() here so as to not break UNC paths. See issue #143
uri = URI.create(manifest.uri.toString() + "/" + lib.file);
} else {
// We avoid using uri.resolve() here so as to not break UNC paths. See issue #143
uri = URI.create(manifest.uri.toString() + lib.file);
}

// We avoid using uri.resolve() here so as to not break UNC paths. See issue #143
String separator = manifest.uri.getPath().endsWith("/") ? "" : "/";
uri = URI.create(manifest.uri.toString() + separator + lib.file);


try (InputStream input = openDownloadStream(uri); OutputStream output = Files.newOutputStream(target)) {
Expand Down

0 comments on commit 2283f39

Please sign in to comment.