]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix #11251 About bcopy not mounting correctly volumes provided with -i option
authorEric Bollengier <eric@baculasystems.com>
Fri, 29 Nov 2024 17:05:27 +0000 (18:05 +0100)
committerEric Bollengier <eric@baculasystems.com>
Mon, 3 Mar 2025 08:11:11 +0000 (09:11 +0100)
bacula/src/stored/butil.c

index 34403ab42d0a0641cb2d9a51bf415db2d7b8b170..192b1aa331a821455b9bf88520cc2ead96bd4498 100644 (file)
@@ -186,9 +186,8 @@ static DCR *setup_to_access_device(JCR *jcr, char *dev_name,
    }
    bstrncpy(dcr->dev_name, device->device_name, sizeof(dcr->dev_name));
 
-   create_restore_volume_list(jcr, true);
-
    if (!writing) {                      /* read only access? */
+      create_restore_volume_list(jcr, true);
       Dmsg0(100, "Acquire device for read\n");
       if (!acquire_device_for_read(dcr, retry_count)) {
          return NULL;