Fix for #18 - correctly pass the HOME environment variable in to the syncthing process.

This commit is contained in:
Chris McCormick 2014-06-08 23:28:15 +02:00
parent 726f62061d
commit a3965c6b83
1 changed files with 1 additions and 1 deletions

View File

@ -135,7 +135,7 @@ public class SyncthingService extends Service {
process = Runtime.getRuntime().exec("sh");
dos = new DataOutputStream(process.getOutputStream());
// Set home directory to data folder for syncthing to use.
dos.writeBytes("HOME=" + getFilesDir() + "\n");
dos.writeBytes("HOME=" + getFilesDir() + " ");
// Call syncthing with -home (as it would otherwise use "~/.config/syncthing/".
dos.writeBytes(getApplicationInfo().dataDir + "/" + BINARY_NAME + " " +
"-home " + getFilesDir() + "\n");