Skip to content

Commit 87f38b2

Browse files
committed
change all zip packing to use game_save_id as temp
1 parent 60d5e1e commit 87f38b2

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

scripts/pack_instruments/pack_instruments.gml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function pack_instruments() {
88
if (fn = "") return 0;
99
fn = enforce_extension(fn, ".zip")
1010

11-
tempdir = data_directory + "temp" + condstr(os_type = os_windows, "\\", "/");
11+
tempdir = game_save_id + "temp" + condstr(os_type = os_windows, "\\", "/");
1212
if (directory_exists_lib(tempdir)) {
1313
directory_delete_lib(tempdir);
1414
}
@@ -33,8 +33,8 @@ function pack_instruments() {
3333
}
3434
}
3535

36-
if (os_type = os_macosx) execute_program("ditto", "-c -k \"" + data_directory + "temp" + "\" \"" + fn + "\"", true);
37-
else execute_program(get_7z_exc_name(), "a -tzip \"" + fn + "\" \"" + data_directory + "temp" + condstr(os_type = os_windows, "\\", "/") + "*\"", true)
36+
if (os_type = os_macosx) execute_program("ditto", "-c -k \"" + game_save_id + "temp" + "\" \"" + fn + "\"", true);
37+
else execute_program(get_7z_exc_name(), "a -tzip \"" + fn + "\" \"" + game_save_id + "temp" + condstr(os_type = os_windows, "\\", "/") + "*\"", true)
3838
directory_delete_lib(tempdir);
3939
if (language != 1) message(string(count) + " instrument" + condstr(count > 1, "s were", " was") + " saved!", "Pack instruments");
4040
else message(string(count) + "个音色已保存!", "导出音色");

scripts/save_song_zip/save_song_zip.gml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function save_song_zip() {
66
if (fn = "") return 0;
77
fn = enforce_extension(fn, ".zip")
88

9-
tempdir = data_directory + "temp" + condstr(os_type = os_windows, "\\", "/");
9+
tempdir = game_save_id + "temp" + condstr(os_type = os_windows, "\\", "/");
1010
if (directory_exists_lib(tempdir)) {
1111
directory_delete_lib(tempdir);
1212
}
@@ -35,8 +35,8 @@ function save_song_zip() {
3535
// Save song
3636
save_song(tempdir + "song.nbs", true);
3737

38-
if (os_type = os_macosx) execute_program("ditto", "-c -k \"" + data_directory + "temp" + "\" \"" + fn + "\"", true);
39-
else execute_program(get_7z_exc_name(), "a -tzip \"" + fn + "\" \"" + data_directory + "temp" + condstr(os_type = os_windows, "\\", "/") + "*\"", true);
38+
if (os_type = os_macosx) execute_program("ditto", "-c -k \"" + game_save_id + "temp" + "\" \"" + fn + "\"", true);
39+
else execute_program(get_7z_exc_name(), "a -tzip \"" + fn + "\" \"" + game_save_id + "temp" + condstr(os_type = os_windows, "\\", "/") + "*\"", true);
4040

4141
if (!file_exists_lib(fn)) {
4242
if (language != 1) message("The song could not be saved!", "Error");

0 commit comments

Comments
 (0)