Skip to content

Commit

Permalink
Avoid redundant mod ids in filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
twanvl committed Nov 17, 2018
1 parent 2d5ec3c commit 09b5c98
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### v0.4.1
* Fix file extension of creature images (#2)
* Avoid redundant mod ids in filenames

### v0.4.0
* No longer automatically exports on startup (can be configured).
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/sts_exporter/ExportHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ String exportDir(ColorExportData color) {
}

ExportPath exportPath(ModExportData mod, String dir, String id, String suffix) {
if (id.startsWith(mod.id+":")) {
id = id.substring(mod.id.length() + 1); // strip mod ids
}
String file = makeFilename(id) + suffix;
return new ExportPath(this.dir, mod.id, dir, file);
}
Expand Down

0 comments on commit 09b5c98

Please sign in to comment.