Skip to content

Commit cc9afb0

Browse files
committed
fix: add error message for failing zip extraction
1 parent 753c637 commit cc9afb0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

scripts/open_song_zip/open_song_zip.gml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ function open_song_zip(filename) {
66
directory_delete_lib(dst_path);
77
}
88

9-
zip_unzip(filename, dst_path);
9+
var output = zip_unzip(filename, dst_path);
10+
if (output < 0) {
11+
throw("This doesn't appear to be a valid ZIP file!")
12+
}
1013

1114
var song_path = dst_path + "song.nbs";
1215
var sounds_path = dst_path + "sounds\\";

0 commit comments

Comments
 (0)