mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-19 22:35:17 +03:00
Replace invalid filesystem characters
This commit is contained in:
parent
8d43a605d9
commit
db46d752d4
1 changed files with 3 additions and 0 deletions
|
@ -170,6 +170,9 @@ function configuration_backup(callback) {
|
||||||
// generate timestamp for the backup file
|
// generate timestamp for the backup file
|
||||||
var now = new Date().toISOString().split(".")[0];
|
var now = new Date().toISOString().split(".")[0];
|
||||||
|
|
||||||
|
// replace invalid filesystem characters
|
||||||
|
now = now.replace(new RegExp(':', 'g'), '_');
|
||||||
|
|
||||||
// create or load the file
|
// create or load the file
|
||||||
chrome.fileSystem.chooseEntry({type: 'saveFile', suggestedName: 'betaflight_backup_' + now + '.json', accepts: accepts}, function (fileEntry) {
|
chrome.fileSystem.chooseEntry({type: 'saveFile', suggestedName: 'betaflight_backup_' + now + '.json', accepts: accepts}, function (fileEntry) {
|
||||||
if (chrome.runtime.lastError) {
|
if (chrome.runtime.lastError) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue