From 7e725763d46934a65c1bcf944abee212579560f8 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Fri, 15 May 2015 20:42:12 +0200 Subject: [PATCH] Removed lenientMtimes code (not needed any more). --- .../syncthingandroid/util/ConfigXml.java | 32 ------------------- 1 file changed, 32 deletions(-) diff --git a/src/main/java/com/nutomic/syncthingandroid/util/ConfigXml.java b/src/main/java/com/nutomic/syncthingandroid/util/ConfigXml.java index 05d50c48..f1e050c1 100644 --- a/src/main/java/com/nutomic/syncthingandroid/util/ConfigXml.java +++ b/src/main/java/com/nutomic/syncthingandroid/util/ConfigXml.java @@ -6,7 +6,6 @@ import android.util.Log; import android.widget.Toast; import com.nutomic.syncthingandroid.syncthing.SyncthingRunnable; -import com.nutomic.syncthingandroid.syncthing.SyncthingService; import org.w3c.dom.Document; import org.w3c.dom.Element; @@ -138,10 +137,6 @@ public class ConfigXml { changed = true; } - if (applyLenientMTimes(r)) { - changed = true; - } - if (applyHashers(r)) { changed = true; } @@ -173,33 +168,6 @@ public class ConfigXml { } } - /** - * Set 'lenientMtimes' (see https://github.com/syncthing/syncthing/issues/831) on the - * given folder. - * - * @return True if the XML was changed. - */ - private boolean applyLenientMTimes(Element folder) { - NodeList childs = folder.getChildNodes(); - for (int i = 0; i < childs.getLength(); i++) { - Node item = childs.item(i); - if (item.getNodeName().equals("lenientMtimes")) { - if (item.getTextContent().equals(Boolean.toString(false))) { - item.setTextContent(Boolean.toString(true)); - return true; - } - return false; - } - } - - // XML tag does not exist, create it. - Log.i(TAG, "Set 'lenientMtimes' on folder " + folder.getAttribute("id")); - Element newElem = mConfig.createElement("lenientMtimes"); - newElem.setTextContent(Boolean.toString(true)); - folder.appendChild(newElem); - return true; - } - /** * Set 'hashers' (see https://github.com/syncthing/syncthing-android/issues/384) on the * given folder.