Always pick directory when exporting csv/database - 2.23 🚀
I'm not sure why but Filesystem.exists seems to return true, even when the app lacks permission to write to the destination
This commit is contained in:
parent
05b4aa75bb
commit
b24cb85a70
|
@ -522,13 +522,8 @@ export default function SettingsPage() {
|
|||
<Button
|
||||
style={{ alignSelf: "flex-start" }}
|
||||
onPress={async () => {
|
||||
let target = settings.backupDir
|
||||
if (!FileSystem.exists(target)) {
|
||||
const result = await DocumentPicker.pickDirectory();
|
||||
target = result.uri
|
||||
setValue("backupDir", result.uri);
|
||||
}
|
||||
const error = await NativeModules.BackupModule.once(target);
|
||||
const result = await DocumentPicker.pickDirectory();
|
||||
const error = await NativeModules.BackupModule.once(result.uri);
|
||||
if (error) toast(error);
|
||||
else toast("Database exported.");
|
||||
}}
|
||||
|
@ -543,13 +538,8 @@ export default function SettingsPage() {
|
|||
<Button
|
||||
style={{ alignSelf: "flex-start" }}
|
||||
onPress={async () => {
|
||||
let target = settings.backupDir
|
||||
if (!target || !FileSystem.exists(target)) {
|
||||
const result = await DocumentPicker.pickDirectory();
|
||||
target = result.uri
|
||||
setValue("backupDir", result.uri);
|
||||
}
|
||||
await NativeModules.BackupModule.exportToCSV(target);
|
||||
const result = await DocumentPicker.pickDirectory();
|
||||
await NativeModules.BackupModule.exportToCSV(result.uri);
|
||||
toast("Exported sets as CSV.");
|
||||
}}
|
||||
>
|
||||
|
|
|
@ -85,8 +85,8 @@ android {
|
|||
applicationId "com.massive"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 36237
|
||||
versionName "2.22"
|
||||
versionCode 36238
|
||||
versionName "2.23"
|
||||
}
|
||||
signingConfigs {
|
||||
release {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "massive",
|
||||
"version": "2.22",
|
||||
"version": "2.23",
|
||||
"private": true,
|
||||
"license": "GPL-3.0-only",
|
||||
"scripts": {
|
||||
|
|
Loading…
Reference in New Issue