Skip to content
This repository was archived by the owner on Dec 3, 2024. It is now read-only.

Commit bee6270

Browse files
committed
Insert missing version 0.3.1 version bump into history.
2 parents 77b7f3a + ebdbb6c commit bee6270

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/main/java/com/nutomic/syncthingandroid/syncthing/SyncthingService.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import android.content.Context;
77
import android.content.Intent;
88
import android.os.AsyncTask;
9-
import android.os.Environment;
109
import android.os.IBinder;
1110
import android.support.v4.app.NotificationCompat;
1211
import android.util.Log;
@@ -125,10 +124,9 @@ public void run() throws NativeExecutionException {
125124
try {
126125
Process p = Runtime.getRuntime().exec("sh");
127126
dos = new DataOutputStream(p.getOutputStream());
128-
// Set home directory to sdcard (so the "create repo" hint makes sense)
129-
dos.writeBytes("HOME=" +
130-
Environment.getExternalStorageDirectory().toString() + "\n");
131-
// Set syncthing config folder to app data folder.
127+
// Set home directory to data folder for syncthing to use.
128+
dos.writeBytes("HOME=" + getApplicationInfo().dataDir + "\n");
129+
// Call syncthing with -home (as it would otherwise use "~/.config/syncthing/".
132130
dos.writeBytes(getApplicationInfo().dataDir + "/" + BINARY_NAME + " " +
133131
"-home " + getApplicationInfo().dataDir + "\n");
134132
dos.writeBytes("exit\n");
@@ -137,7 +135,7 @@ public void run() throws NativeExecutionException {
137135
ret = p.waitFor();
138136

139137
// Write syncthing binary output to log.
140-
// NOTE: This is only done on shutdown, not in real time.
138+
// NOTE: This is only done on shutdown, not live.
141139
isr = new InputStreamReader(p.getInputStream());
142140
BufferedReader stdout = new BufferedReader(isr);
143141
String line;

0 commit comments

Comments
 (0)