[pbs-devel] [PATCH proxmox-backup 3/4] api2/types/tape/media_location: fix deserialization of MediaLocation::Vault

Dominik Csapak d.csapak at proxmox.com
Thu Feb 11 14:11:19 CET 2021


Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 src/api2/types/tape/media_location.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/api2/types/tape/media_location.rs b/src/api2/types/tape/media_location.rs
index 31a15c65..031369e3 100644
--- a/src/api2/types/tape/media_location.rs
+++ b/src/api2/types/tape/media_location.rs
@@ -83,7 +83,7 @@ impl std::str::FromStr for MediaLocation {
             return Ok(MediaLocation::Online(changer.to_string()));
         }
         if let Some(vault) = s.strip_prefix("vault-") {
-            return Ok(MediaLocation::Online(vault.to_string()));
+            return Ok(MediaLocation::Vault(vault.to_string()));
         }
 
         bail!("MediaLocation parse error");
-- 
2.20.1






More information about the pbs-devel mailing list