Thomas Lamprecht <t.lampre...@proxmox.com> writes:

> Am 22.11.24 um 14:13 schrieb Daniel Herzig:
>> diff --git a/src/PVE/Storage/DirPlugin.pm b/src/PVE/Storage/DirPlugin.pm
>> index fb23e0a..c72c321 100644
>> --- a/src/PVE/Storage/DirPlugin.pm
>> +++ b/src/PVE/Storage/DirPlugin.pm
>> @@ -245,6 +245,8 @@ sub check_config {
>>      if ($opts->{path} !~ m|^/[-/a-zA-Z0-9_.@]+$|) {
>>      die "illegal path for directory storage: $opts->{path}\n";
>>      }
>> +    # remove trailing slashes from path
>> +    $opts->{path} =~ s|(.*[^/])/+$|$1|;
>
> If we want to use the always available File::Spec module, like Max wanted to
> in a recent series, this could be changed to
>
> $opts->{path} = File::Spec->canonpath($opts->{path});
>
Thanks! Well, this would look the cleanest to me, I did not have this module on 
my
radar yet.

Will use it in v3!
>>      return $opts;
>>  }
>>  


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to