Skip to content

Commit 074c03f

Browse files
authored
Auto merged - #2666 at Sat, 27 Nov 2021 08:17:11 GMT
Fixed Android File System
2 parents 7040a5b + c5bb584 commit 074c03f

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

locales/en/messages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6220,7 +6220,7 @@
62206220
"message": "File name"
62216221
},
62226222
"dialogFileNameDescription": {
6223-
"message": "The file will be saved in the '{{folder}}' folder in your internal storage."
6223+
"message": "The file will be saved in the 'Android/data/betaflight-configurator/{{folder}}' folder in your internal storage."
62246224
},
62256225
"dialogFileAlreadyExistsTitle": {
62266226
"message": "This file already exists!"

src/js/cordova_chromeapi.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ const chromeapiFilesystem = {
309309
options.suggestedName = 'newfile';
310310
}
311311
const extension = self.getFileExtension(options.suggestedName);
312-
const folder = 'Betaflight configurator';
312+
const folder = 'files';
313313
navigator.notification.prompt(i18n.getMessage('dialogFileNameDescription', {
314314
folder: folder,
315315
}), function(res) {
@@ -319,10 +319,9 @@ const chromeapiFilesystem = {
319319
if (newExtension === undefined) {
320320
fileName += `.${extension}`;
321321
}
322-
window.resolveLocalFileSystemURL(cordova.file.externalRootDirectory, function(rootEntry) {
322+
window.resolveLocalFileSystemURL(cordova.file.externalApplicationStorageDirectory, function(rootEntry) {
323323
rootEntry.getDirectory(folder, { create: true }, function(directoryEntry) {
324324
directoryEntry.getFile(fileName, { create: false }, function(fileEntry) {
325-
console.log(fileEntry);
326325
navigator.notification.confirm(i18n.getMessage('dialogFileAlreadyExistsDescription'), function(resp) {
327326
if (resp === 1) {
328327
chromeCallbackWithSuccess(fileEntry, callback);

0 commit comments

Comments
 (0)