mirror of
https://github.com/syncthing/syncthing-android.git
synced 2025-01-05 01:31:29 +00:00
WIP - Do not run
This commit is contained in:
parent
eb0819c31e
commit
b975449b69
1 changed files with 6 additions and 8 deletions
|
@ -20,8 +20,7 @@ import java.io.IOException;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
|
|
||||||
import java.io.StringReader;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.util.Properties;
|
|
||||||
|
|
||||||
import eu.chainfire.libsuperuser.Shell;
|
import eu.chainfire.libsuperuser.Shell;
|
||||||
|
|
||||||
|
@ -142,19 +141,18 @@ public class Util {
|
||||||
useRoot = true;
|
useRoot = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ToDo - For testing purposes only.
|
||||||
absoluteFolderPath = "/storage/emulated/0/Папка";
|
absoluteFolderPath = "/storage/emulated/0/Папка";
|
||||||
|
byte absoluteFolderPathBytes[] = absoluteFolderPath.getBytes();
|
||||||
Properties p = new Properties();
|
|
||||||
try {
|
try {
|
||||||
p.load(new StringReader("key="+absoluteFolderPath));
|
absoluteFolderPath = new String(absoluteFolderPathBytes, "Cp1251");
|
||||||
} catch(IOException e) {
|
} catch(UnsupportedEncodingException e) {
|
||||||
Log.e(TAG, "Error", e);
|
Log.e(TAG, "Error", e);
|
||||||
}
|
}
|
||||||
absoluteFolderPath = p.getProperty("key");
|
|
||||||
|
|
||||||
// Write permission test file.
|
// Write permission test file.
|
||||||
String touchFile = absoluteFolderPath + "/" + TOUCH_FILE_NAME;
|
String touchFile = absoluteFolderPath + "/" + TOUCH_FILE_NAME;
|
||||||
int exitCode = runShellCommand("mkdir -p \"" + absoluteFolderPath + "\"; echo \"\" > \"" + touchFile + "\"\n", useRoot);
|
int exitCode = runShellCommand("rm -f \"" + absoluteFolderPath + "\"; echo \"\" > \"" + touchFile + "\"\n", useRoot);
|
||||||
if (exitCode != 0) {
|
if (exitCode != 0) {
|
||||||
String error;
|
String error;
|
||||||
switch (exitCode) {
|
switch (exitCode) {
|
||||||
|
|
Loading…
Reference in a new issue