Skip to content

Commit 8e25e3e

Browse files
committed
Fix mod zips closing when sounds fail to load
1 parent a7fada0 commit 8e25e3e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

arc-core/src/arc/audio/Sound.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public void load(Fi file){
4949
try {
5050
handle = wavLoad(data, data.length);
5151
} catch (ArcRuntimeException e) {
52-
if (e.getMessage().contains("File found")) {
52+
if (!(file instanceof ZipFi) && e.getMessage().contains("File found")) {
5353
file.delete();
5454
throw new ArcRuntimeException(file.absolutePath(), e);
5555
} else throw e;

arc-core/src/arc/util/Threads.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,12 @@ public static ExecutorService executor(@Nullable String name, int threads){
9999
// }
100100
//
101101

102-
/** Prints a trace starting right before this method */
102+
/** Returns a trace starting right before this method */
103103
public static String getTrace(){
104104
return getTrace(1);
105105
}
106106

107-
/** Prints a trace starting right before this method + extraIgnoredLines lines */
107+
/** Returns a trace starting right before this method + extraIgnoredLines lines */
108108
public static String getTrace(int extraIgnoredLines){
109109
StackTraceElement[] st = new Exception().getStackTrace();
110110
StringBuilder sb = new StringBuilder();

0 commit comments

Comments
 (0)