Skip to content

Commit db46d75

Browse files
committed
Replace invalid filesystem characters
1 parent 8d43a60 commit db46d75

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

js/backup_restore.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ function configuration_backup(callback) {
170170
// generate timestamp for the backup file
171171
var now = new Date().toISOString().split(".")[0];
172172

173+
// replace invalid filesystem characters
174+
now = now.replace(new RegExp(':', 'g'), '_');
175+
173176
// create or load the file
174177
chrome.fileSystem.chooseEntry({type: 'saveFile', suggestedName: 'betaflight_backup_' + now + '.json', accepts: accepts}, function (fileEntry) {
175178
if (chrome.runtime.lastError) {

0 commit comments

Comments
 (0)