fix snapshot listing fallback

This commit is contained in:
Christoph Klaffl 2022-09-13 00:02:03 +02:00
parent ef601eb96b
commit 4f150ec6ec
No known key found for this signature in database
GPG Key ID: 8FC1D76EED4970D2
1 changed files with 3 additions and 1 deletions

View File

@ -1503,6 +1503,8 @@ sub getsnaps() {
my $fsescaped = escapeshellparam($fs);
if ($isroot) { $mysudocmd = ''; } else { $mysudocmd = $sudocmd; }
my $rhostOriginal = $rhost;
if ($rhost ne '') {
$rhost = "$sshcmd $rhost";
# double escaping needed
@ -1520,7 +1522,7 @@ sub getsnaps() {
my @rawsnaps = <FH>;
close FH or do {
# fallback (solaris for example doesn't support the -t option)
return getsnapsfallback($type,$rhost,$fs,$isroot,%snaps);
return getsnapsfallback($type,$rhostOriginal,$fs,$isroot,%snaps);
};
# this is a little obnoxious. get guid,creation returns guid,creation on two separate lines