Fix events file not being removed when all global events are deleted (#826). Friday Night Funkin'

This commit is contained in:
Jurta
2025-11-19 07:00:12 +07:00
committed by GitHub
parent 5eddbc59d3
commit cdb751e6e1
+1
View File
@@ -300,6 +300,7 @@ class Chart {
var eventsPath = '$songPath/events$variantSuffix.json', events = filterEventsForSaving(chart.events, false, true);
if (events.length != 0) CoolUtil.safeSaveFile(eventsPath, Json.stringify({events: events}, null, prettyPrint));
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).
}
#end