Permalink
Browse files

Fixed broken URLs with the relative path calculation.

  • Loading branch information...
sk89q committed Jun 11, 2013
1 parent e21d6d5 commit 192bad54b5d5f7b0c79c2faa6421d9df227fef9c
Showing with 7 additions and 3 deletions.
  1. +7 −3 src/main/java/com/sk89q/lpbuilder/UpdateBuilder.java
@@ -218,8 +218,12 @@ private void collectFiles(
if (group == null) {
group = new FileGroup();
- group.setDest(relativeDir);
- group.setSource(relativeDir);
+ String withSlash = relativeDir;
+ if (!withSlash.isEmpty()) {
+ withSlash = withSlash + "/";
+ }
+ group.setDest(withSlash);
+ group.setSource(withSlash);
addGroup = true;
}
@@ -341,7 +345,7 @@ private void commitBuckets() throws IOException, InterruptedException {
ZipBucket bucket = entry.getValue();
bucket.writeContents(versionBuilder, updateDir, target);
- bucket.setSize(target.length());;
+ bucket.setSize(target.length());
bucket.setFilename(filename);
// Match patterns and apply properties

0 comments on commit 192bad5

Please sign in to comment.