1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-12-27 13:21:30 +00:00

Export config to backups/syncthing instead of sd card root (fixes #364).

This commit is contained in:
Felix Ableitner 2015-04-20 21:32:34 +02:00
parent 92fae9df89
commit c767259889

View file

@ -68,7 +68,8 @@ public class SyncthingService extends Service {
/**
* Directory where config is exported to and imported from.
*/
public static final File EXPORT_PATH = Environment.getExternalStorageDirectory();
public static final File EXPORT_PATH =
new File(Environment.getExternalStorageDirectory(), "backups/syncthing");
/**
* Path to the native, integrated syncthing binary, relative to the data folder
@ -440,6 +441,7 @@ public class SyncthingService extends Service {
* Exports the local config and keys to {@link #EXPORT_PATH}.
*/
public void exportConfig() {
EXPORT_PATH.mkdirs();
copyFile(new File(getFilesDir(), ConfigXml.CONFIG_FILE),
new File(EXPORT_PATH, ConfigXml.CONFIG_FILE));
copyFile(new File(getFilesDir(), PRIVATE_KEY_FILE),