Skip to content

Commit cdb751e

Browse files
authored
Fix events file not being removed when all global events are deleted (#826). Friday Night Funkin'
1 parent 5eddbc5 commit cdb751e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

source/funkin/backend/chart/Chart.hx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ class Chart {
300300
var eventsPath = '$songPath/events$variantSuffix.json', events = filterEventsForSaving(chart.events, false, true);
301301

302302
if (events.length != 0) CoolUtil.safeSaveFile(eventsPath, Json.stringify({events: events}, null, prettyPrint));
303+
else if (FileSystem.exists(eventsPath)) FileSystem.deleteFile(eventsPath); // If there's no events to save, then get rid of the file (if it exists already).
303304
}
304305
#end
305306

0 commit comments

Comments
 (0)