1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-26 06:11:19 +00:00

Start syncthing with STNORESTART flag.

This avoids the problem where an occupied GUI start lets syncthing-android
start, but API calls fail silently.
This commit is contained in:
Felix Ableitner 2014-09-28 20:42:15 +03:00
parent bd281abade
commit 2b5435c1e8

View file

@ -53,6 +53,7 @@ public class SyncthingRunnable implements Runnable {
// Set home directory to data folder for syncthing to use.
dos.writeBytes("HOME=" + mContext.getFilesDir() + " ");
dos.writeBytes("STTRACE=" + pm.getString("sttrace", "") + " ");
dos.writeBytes("STNORESTART=1 ");
// Call syncthing with -home (as it would otherwise use "~/.config/syncthing/".
dos.writeBytes(mCommand + " -home " + mContext.getFilesDir() + "\n");
dos.writeBytes("exit\n");