Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix URL encoding when on systems which support spaces inside of paths…

… on the filesystem (I'm looking at you Windows).
  • Loading branch information...
commit 6f9e737757d368d811a74367da33ba51441e00e3 1 parent 0240195
@zacbrown zacbrown authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/Maker.java
View
5 src/Maker.java
@@ -1,5 +1,6 @@
import java.util.*;
import java.io.*;
+import java.net.*;
public class Maker implements MakoConstants {
@@ -352,8 +353,8 @@ else if (token.equals(":include")) {
if (srcName.startsWith("<")) {
// I highly suspect this is a brittle solution- I need
// to test this on different machine configurations.
- String libPath = new File(Maker.class.getProtectionDomain()
- .getCodeSource().getLocation().getPath()).getParent();
+ String libPath = URLDecoder.decode(new File(Maker.class.getProtectionDomain()
+ .getCodeSource().getLocation().getPath()).getParent(), "UTF-8");
currentPath.push(libPath + "/../lib/");
String fileName = srcName.substring(1, srcName.length() - 1);
Please sign in to comment.
Something went wrong with that request. Please try again.