Skip to content

Commit

Permalink
Fixed broken URLs with the relative path calculation.
Browse files Browse the repository at this point in the history
  • Loading branch information
sk89q committed Jun 11, 2013
1 parent e21d6d5 commit 192bad5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/main/java/com/sk89q/lpbuilder/UpdateBuilder.java
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -218,8 +218,12 @@ private void collectFiles(


if (group == null) { if (group == null) {
group = new FileGroup(); group = new FileGroup();
group.setDest(relativeDir); String withSlash = relativeDir;
group.setSource(relativeDir); if (!withSlash.isEmpty()) {
withSlash = withSlash + "/";
}
group.setDest(withSlash);
group.setSource(withSlash);
addGroup = true; addGroup = true;
} }


Expand Down Expand Up @@ -341,7 +345,7 @@ private void commitBuckets() throws IOException, InterruptedException {


ZipBucket bucket = entry.getValue(); ZipBucket bucket = entry.getValue();
bucket.writeContents(versionBuilder, updateDir, target); bucket.writeContents(versionBuilder, updateDir, target);
bucket.setSize(target.length());; bucket.setSize(target.length());
bucket.setFilename(filename); bucket.setFilename(filename);


// Match patterns and apply properties // Match patterns and apply properties
Expand Down

0 comments on commit 192bad5

Please sign in to comment.