From 7a932d340da5ee49241503ce7b90c704d4ae22ff Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 31 Jan 2022 23:12:52 +0100 Subject: ... --- accounts/gkleen@sif/systemd.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'accounts') diff --git a/accounts/gkleen@sif/systemd.nix b/accounts/gkleen@sif/systemd.nix index bd506590..ff3d11af 100644 --- a/accounts/gkleen@sif/systemd.nix +++ b/accounts/gkleen@sif/systemd.nix @@ -60,7 +60,7 @@ in { remote_fs = 'surtr' - remote_file = f'{remote_fs}:store.kdbx' + remote_file = 'store.kdbx' target_file = expanduser('~/store.kdbx') meta_file = expanduser('~/.store.kdbx.json') @@ -71,7 +71,7 @@ in { def get_upload_time(): upload_time = None - with subprocess.Popen(['rclone', 'lsjson', remote_file], stdout=subprocess.PIPE) as proc: # noqa: E501 + with subprocess.Popen(['rclone', 'lsjson', f'{remote_fs}:{dirname(remote_file)}'], stdout=subprocess.PIPE) as proc: # noqa: E501 for file in json.load(proc.stdout): if file['Path'] != 'store.kdbx': continue @@ -81,7 +81,7 @@ in { def do_upload(): print('Uploading', file=stderr) - subprocess.run(['rclone', 'copy', '-I', target_file, f'{remote_fs}:'], check=True) # noqa: E501 + subprocess.run(['rclone', 'copy', '-I', target_file, f'{remote_fs}:{dirname(remote_file)}'], check=True) # noqa: E501 upload_time = get_upload_time() with open(meta_file, 'w') as file: json.dump({'our_last_upload_time': upload_time.isoformat()}, file) @@ -89,7 +89,7 @@ in { def do_download(): print('Downloading', file=stderr) - subprocess.run(['rclone', 'copy', '-I', remote_file, dirname(target_file)], check=True) # noqa: E501 + subprocess.run(['rclone', 'copy', '-I', f'{remote_fs}:{remote_file}', dirname(target_file)], check=True) # noqa: E501 upload_time = get_upload_time() -- cgit v1.2.3