Skip to content

Commit

Permalink
Update JMpqEditor.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Frotty committed Dec 31, 2019
1 parent 2019a61 commit 5a1fbea
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/main/java/systems/crigges/jmpq3/JMpqEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -628,12 +628,10 @@ public void deleteFile(String name) {
throw new NonWritableChannelException();
}

if (!listFile.containsFile(name)) {
throw new IllegalArgumentException("Archive does not contain file with name: " + name);
if (listFile.containsFile(name)) {
listFile.removeFile(name);
filenameToData.remove(name);
}

listFile.removeFile(name);
filenameToData.remove(name);
}

/**
Expand Down

0 comments on commit 5a1fbea

Please sign in to comment.