1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2025-01-11 04:25:53 +00:00

Merge pull request #768 from capi/stguiassets-nullpointer

Fix NullPointerException for STGUIASSETS
This commit is contained in:
Felix Ableitner 2016-10-21 08:31:58 +09:00 committed by GitHub
commit 220917e060

View file

@ -13,6 +13,7 @@ import com.nutomic.syncthingandroid.BuildConfig;
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
@ -118,7 +119,9 @@ public class SyncthingRunnable implements Runnable {
// Set home directory to data folder for web GUI folder picker.
env.put("HOME", Environment.getExternalStorageDirectory().getAbsolutePath());
env.put("STTRACE", sp.getString("sttrace", ""));
env.put("STGUIASSETS", mContext.getExternalFilesDir(null).getAbsolutePath() + "/gui");
File externalFilesDir = mContext.getExternalFilesDir(null);
if (externalFilesDir != null)
env.put("STGUIASSETS", externalFilesDir.getAbsolutePath() + "/gui");
env.put("STNORESTART", "1");
env.put("STNOUPGRADE", "1");
if (sp.getBoolean("use_tor", false)) {