]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
importctl: fix -N to actually clear keep-download flag
authorZbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>
Fri, 10 Apr 2026 16:26:58 +0000 (18:26 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>
Sat, 11 Apr 2026 11:30:42 +0000 (13:30 +0200)
-N was clearing and re-setting the same bit in arg_import_flags_mask,
which is a no-op. It should clear the bit in arg_import_flags instead,
matching what --keep-download=no does via SET_FLAG().

src/import/importctl.c

index 2993073cc5c1d83bd4288bf6f40271c8604780a2..cb6f61e89366cb09cb3079968bdc018e4ab9fc86 100644 (file)
@@ -1273,7 +1273,7 @@ static int parse_argv(int argc, char *argv[]) {
                         break;
 
                 case 'N':
-                        arg_import_flags_mask &= ~IMPORT_PULL_KEEP_DOWNLOAD;
+                        arg_import_flags &= ~IMPORT_PULL_KEEP_DOWNLOAD;
                         arg_import_flags_mask |= IMPORT_PULL_KEEP_DOWNLOAD;
                         break;