diff --git a/js/backup_restore.js b/js/backup_restore.js index 1b6e56cf..fbbb3b6f 100644 --- a/js/backup_restore.js +++ b/js/backup_restore.js @@ -170,6 +170,9 @@ function configuration_backup(callback) { // generate timestamp for the backup file var now = new Date().toISOString().split(".")[0]; + // replace invalid filesystem characters + now = now.replace(new RegExp(':', 'g'), '_'); + // create or load the file chrome.fileSystem.chooseEntry({type: 'saveFile', suggestedName: 'betaflight_backup_' + now + '.json', accepts: accepts}, function (fileEntry) { if (chrome.runtime.lastError) {