From 5151c3485b85d7f9bdcdd4c727dfe91445272651 Mon Sep 17 00:00:00 2001 From: Catfriend1 Date: Tue, 5 Mar 2019 23:40:42 +0100 Subject: [PATCH] Add model/Folder#CopyOwnershipFromParent (fixes #286) (#287) * Add model/Folder#CopyOwnershipFromParent (fixes #286) See https://github.com/syncthing/syncthing/pull/5479/files * Fix typo, update doc ref * Update ConfigXml --- .../java/com/nutomic/syncthingandroid/model/Folder.java | 8 ++++++++ .../java/com/nutomic/syncthingandroid/util/ConfigXml.java | 1 + 2 files changed, 9 insertions(+) diff --git a/app/src/main/java/com/nutomic/syncthingandroid/model/Folder.java b/app/src/main/java/com/nutomic/syncthingandroid/model/Folder.java index aca5d527..d586c641 100644 --- a/app/src/main/java/com/nutomic/syncthingandroid/model/Folder.java +++ b/app/src/main/java/com/nutomic/syncthingandroid/model/Folder.java @@ -11,6 +11,11 @@ import java.util.Iterator; import java.util.List; import java.util.Map; +/** + * Sources: + * - https://github.com/syncthing/syncthing/tree/master/lib/config + * - https://github.com/syncthing/syncthing/blob/master/lib/config/folderconfiguration.go + */ public class Folder { // Folder Configuration @@ -42,6 +47,9 @@ public class Folder { public int weakHashThresholdPct = 25; public String markerName = ".stfolder"; + // Since v1.1.0, see Issue #5445, PR #5479 + public Boolean copyOwnershipFromParent = false; + // Folder Status public String invalid; diff --git a/app/src/main/java/com/nutomic/syncthingandroid/util/ConfigXml.java b/app/src/main/java/com/nutomic/syncthingandroid/util/ConfigXml.java index 2373c1a3..50cd8928 100644 --- a/app/src/main/java/com/nutomic/syncthingandroid/util/ConfigXml.java +++ b/app/src/main/java/com/nutomic/syncthingandroid/util/ConfigXml.java @@ -436,6 +436,7 @@ public class ConfigXml { folder.order = getContentOrDefault(r.getElementsByTagName("order").item(0), "random"); folder.paused = getContentOrDefault(r.getElementsByTagName("paused").item(0), false); folder.useLargeBlocks = getContentOrDefault(r.getElementsByTagName("useLargeBlocks").item(0), false); + folder.copyOwnershipFromParent = getContentOrDefault(r.getElementsByTagName("copyOwnershipFromParent").item(0), false); // Devices /*