From 44ebf6db6cf2725e18f0e1129f4005fd456b03dc Mon Sep 17 00:00:00 2001 From: Lena Date: Wed, 1 Jul 2026 00:00:00 +0000 Subject: app: drop --mkpath for compatibility with old remote rsyncs rsync forwards --mkpath to the remote side when sending, so a remote rsync older than 3.2.3 (notably stock macOS, whose openrsync is "rsync 2.6.9 compatible") rejects every sync with "unrecognized option '--mkpath'". rsync creates the final component of the destination path on its own, so flat remote paths keep working everywhere, including the documented rrsync setup whose root is pre-created. Only a nested remote path with missing parents now needs a one-time mkdir -p on the server; the log shows rsync's error when it is missing. Reported-by: jsvk Link: https://codeberg.org/0xlena/rsend/pulls/1 --- app/src/main/java/invalid/lena/rsend/RsyncRunner.kt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'app/src/main') diff --git a/app/src/main/java/invalid/lena/rsend/RsyncRunner.kt b/app/src/main/java/invalid/lena/rsend/RsyncRunner.kt index c37e3ce..4d636a6 100644 --- a/app/src/main/java/invalid/lena/rsend/RsyncRunner.kt +++ b/app/src/main/java/invalid/lena/rsend/RsyncRunner.kt @@ -11,16 +11,20 @@ import kotlinx.coroutines.launch object RsyncRunner { // args builds the rsync argument vector for one folder. Flags are tuned for - // media backup: recursive, preserve mtimes, resume partial files, create - // the remote path, and skip the ownership and permission bits that mean - // nothing across Android and a server. + // media backup: recursive, preserve mtimes, resume partial files, and skip + // the ownership and permission bits that mean nothing across Android and a + // server. + // + // No --mkpath: rsync forwards it to the remote when sending, and remotes + // older than 3.2.3 (notably stock macOS) reject it. rsync creates the + // final component of the destination path on its own; deeper missing + // parents need a one-time mkdir on the server (see README). fun args(rsh: String, remote: Remote, f: Folder): List { val a = ArrayList() a.add("-rt") a.add("--partial") // Abort rather than hang if the network stalls for 5 minutes. a.add("--timeout=300") - a.add("--mkpath") a.add("--no-perms") a.add("--no-owner") a.add("--no-group") -- cgit v1.2.3