1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-12-27 21:31:29 +00:00

Don't need to replace /sdcard/ with proper path any more.

FolderPickerActivity always uses the correct path.
This commit is contained in:
Felix Ableitner 2015-03-22 00:55:25 +01:00
parent b780fb57f0
commit d5bbaafdb4

View file

@ -109,8 +109,6 @@ public class ConfigXml {
boolean changed = false;
Element options = (Element) mConfig.getDocumentElement()
.getElementsByTagName("options").item(0);
Element gui = (Element) mConfig.getDocumentElement()
.getElementsByTagName("gui").item(0);
// Hardcode default globalAnnounceServer ip.
NodeList globalAnnounceServer = options.getElementsByTagName("globalAnnounceServer");
@ -139,17 +137,9 @@ public class ConfigXml {
changed = true;
}
// Replace /sdcard/ in folder path with proper path.
String dir = r.getAttribute("path");
if (dir.startsWith("/sdcard")) {
String newDir = dir.replace("/sdcard",
Environment.getExternalStorageDirectory().getAbsolutePath());
r.setAttribute("directory", newDir);
changed = true;
}
// HACK: Create .stfolders in all folders if it does not exist.
// This is not the best place to put it, but it's only temporary.
String dir = r.getAttribute("path");
try {
new File(dir, ".stfolder").createNewFile();
} catch (IOException e) {