1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2025-01-09 11:41:29 +00:00

Removed unneeded create directory code in Java.

This was actually fixed by adding the WRITE_EXTERNAL_STORAGE permission.
This commit is contained in:
Felix Ableitner 2014-05-05 22:48:53 +02:00
parent 72bb26f110
commit 0b075eb60e

View file

@ -2,25 +2,13 @@ package com.nutomic.syncthingandroid;
import android.app.Activity;
import android.os.Bundle;
import android.os.Environment;
import android.util.Log;
import java.io.File;
public class MainActivity extends Activity {
private static final String TAG = "MainActivity";
private static final File SYNCTHING_FOLDER =
new File(Environment.getExternalStorageDirectory(), "syncthing");
@Override public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (!SYNCTHING_FOLDER.isDirectory() && !SYNCTHING_FOLDER.mkdir()) {
Log.w(TAG, "Failed to create syncthing folder on sdcard, exiting");
finish();
return;
}
System.loadLibrary("syncthing");
}