Fix renaming to wrong extension

This commit is contained in:
johni0702
2015-10-11 17:06:46 +02:00
parent 475212449a
commit 01f9fcce4e

View File

@@ -43,7 +43,7 @@ public class GuiRenameReplay extends AbstractGuiScreen<GuiRenameReplay> {
// Sanitize their input // Sanitize their input
String name = nameField.getText().trim().replace("[^a-zA-Z0-9\\.\\- ]", "_"); String name = nameField.getText().trim().replace("[^a-zA-Z0-9\\.\\- ]", "_");
// This file is what they want // This file is what they want
File targetFile = new File(file.getParentFile(), name + ".zip"); File targetFile = new File(file.getParentFile(), name + ".mcpr");
// But if it's already used, this is what they get // But if it's already used, this is what they get
File renamed = ReplayFileIO.getNextFreeFile(targetFile); File renamed = ReplayFileIO.getNextFreeFile(targetFile);
try { try {