]> git.sur5r.net Git - bacula/bacula/commitdiff
Tweak Storage warning message for restore when StorageId not found
authorKern Sibbald <kern@sibbald.com>
Thu, 21 Jun 2012 20:33:03 +0000 (22:33 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:50:50 +0000 (14:50 +0200)
bacula/src/dird/ua_restore.c

index 67f4f3fa727e4b8a44bdd394c826df9a5d761feb..ebc9b8437e909d2b29622e492cc4e853564cb1b7 100644 (file)
@@ -1530,8 +1530,13 @@ void find_storage_resource(UAContext *ua, RESTORE_CTX &rx, char *Storage, char *
             if (acl_access_ok(ua, Storage_ACL, store->name())) {
                rx.store = store;
                Dmsg1(200, "Set store=%s\n", rx.store->name());
-               ua->warning_msg(_("Storage \"%s\" not found, using Storage \"%s\" from MediaType \"%s\".\n"),
-                  Storage, store->name(), MediaType);
+               if (Storage == NULL) {
+                  ua->warning(_("Using Storage \"%s\" from MediaType \"%s\".\n"),
+                     store->name(), MediaType);
+               } else {
+                  ua->warning_msg(_("Storage \"%s\" not found, using Storage \"%s\" from MediaType \"%s\".\n"),
+                     Storage, store->name(), MediaType);
+               }
             }
             UnlockRes();
             return;