Skip to content
This repository has been archived by the owner on Mar 12, 2023. It is now read-only.

Fix download URLs with spaces #11

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/vazkii/instancesync/DownloadManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ private void download(final File target, final String downloadUrl) {
System.out.println("Downloading " + name);
long time = System.currentTimeMillis();

URL url = new URL(downloadUrl);
String downloadUrlEscaped = downloadUrl.replaceAll(" ", "%20");
URL url = new URL(downloadUrlEscaped);
FileOutputStream out = new FileOutputStream(target);

URLConnection connection = url.openConnection();
Expand Down
2 changes: 1 addition & 1 deletion src/vazkii/instancesync/InstanceSync.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

public final class InstanceSync {

private static final String VERSION = "1.0.2";
private static final String VERSION = "1.0.4";

public static void main(String[] args) {
System.out.println("InstanceSync " + VERSION);
Expand Down