diff --git a/src/main/java/se/lantz/model/InfoModel.java b/src/main/java/se/lantz/model/InfoModel.java index 5237c99..9095c65 100644 --- a/src/main/java/se/lantz/model/InfoModel.java +++ b/src/main/java/se/lantz/model/InfoModel.java @@ -350,7 +350,7 @@ public class InfoModel extends AbstractModel this.gamesPath = file.toPath(); //Set games name, always add ".gz"?? String fileName = FileManager.generateFileNameFromTitle(this.title, getDuplicateIndex()); - String fileEnding = file.getName().substring(file.getName().indexOf(".")); + String fileEnding = file.getName().substring(file.getName().lastIndexOf(".")); if (FileManager.shouldCompressFile(file.getName())) {