Permalink
Browse files

Stop package remapper from changing directories into files when apply…

…ing rules that add prefixes to resources
  • Loading branch information...
1 parent c1524c1 commit d880def9bc0886c1cce4f39f41cbc9aa83678bd4 @mcculls mcculls committed Oct 17, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/main/java/com/tonicsystems/jarjar/PackageRemapper.java
@@ -76,7 +76,10 @@ public String mapPath(String path) {
if (absolute) s = "/" + s;
if (s.indexOf(RESOURCE_SUFFIX) < 0)
return path;
- s = s.substring(0, s.length() - RESOURCE_SUFFIX.length()) + end;
+ if (end.length() > 0)
+ s = s.substring(0, s.length() - RESOURCE_SUFFIX.length()) + end;
+ else
+ s = s.substring(0, s.lastIndexOf('/') + 1);
pathCache.put(path, s);
}
return s;

0 comments on commit d880def

Please sign in to comment.