api: import working storage: improve error message
the ui and api talks about 'import working storage' but the error here still said 'for extraction'. Improve the message by unifiying the wording and adding the storage name to it too. Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
ba6bfffecf
commit
2a7cba6fdc
1 changed files with 3 additions and 2 deletions
|
|
@ -178,14 +178,15 @@ my $check_storage_access = sub {
|
|||
? PVE::Storage::storage_config($storecfg, $extraction_storage)
|
||||
: $scfg;
|
||||
my $extraction_param = defined($extraction_storage) ? 'import-working-storage' : $ds;
|
||||
my $extraction_id = $extraction_storage // $storeid;
|
||||
|
||||
if (!$extraction_scfg->{content}->{images} || !$extraction_scfg->{path}) {
|
||||
raise_param_exc({
|
||||
$extraction_param => "storage selected for extraction does not support"
|
||||
$extraction_param => "import working storage '$extraction_id' does not support"
|
||||
." 'images' content type or is not file based.",
|
||||
});
|
||||
}
|
||||
$rpcenv->check($authuser, "/storage/" . ($extraction_storage // $storeid), ['Datastore.AllocateSpace']);
|
||||
$rpcenv->check($authuser, "/storage/$extraction_id", ['Datastore.AllocateSpace']);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue