This patch removes trailing slashes from manually entered paths by adding an additional if clause in the sub check_config.
Signed-off-by: Daniel Herzig <d.her...@proxmox.com> --- src/PVE/Storage/DirPlugin.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/PVE/Storage/DirPlugin.pm b/src/PVE/Storage/DirPlugin.pm index 2efa8d5..9dcdf4a 100644 --- a/src/PVE/Storage/DirPlugin.pm +++ b/src/PVE/Storage/DirPlugin.pm @@ -244,6 +244,9 @@ sub check_config { if ($opts->{path} !~ m|^/[-/a-zA-Z0-9_.@]+$|) { die "illegal path for directory storage: $opts->{path}\n"; } + if ($opts->{path} =~ /.*\/$/) { + $opts->{path} = substr($opts->{path}, 0 , -1); + } return $opts; } -- 2.39.5 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel