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
1 changed files with 1 additions and 0 deletions

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");