+ if ($archive eq '-') {
+ die "pipe requires cli environment\n"
+ && $rpcenv->{type} ne 'cli';
+ } else {
+ if (PVE::Storage::parse_volume_id($archive, 1)) {
+ $archive = PVE::Storage::path($storecfg, $archive);
+ } else {
+ raise_param_exc({ archive => "Only root can pass arbitrary paths." })
+ if $user ne 'root@pam';
+
+ $archive = abs_path($archive);
+ }
+ die "can't find file '$archive'\n" if ! -f $archive;
+ }