btrbk: fix: ignore mount points with unsupported filename in action "ls"

Mount points with illegal characters would die in vinfo. Print error
and ignore.
pull/409/head
Axel Burri 2021-07-14 22:16:54 +02:00
parent 12f6c5b69f
commit af6d719acc
1 changed files with 6 additions and 0 deletions

6
btrbk
View File

@ -5949,6 +5949,12 @@ MAIN:
if(($mnt->{fs_type} eq "btrfs") &&
(($root_path =~ /^\Q$mnt_path\E/) || ($mnt_path =~ /^\Q$root_path\E/)))
{
unless(defined(check_file($mnt->{mount_point}, { absolute => 1}))) {
ERROR "Ignoring btrfs mount point (unsupported file name): $mnt->{mount_point}";
$exit_status = 1;
next;
}
# we know those are real paths, prevents calling readlink in btrfs_mountpoint
$realpath_cache{$root_vol->{URL_PREFIX} . $mnt->{mount_point}} = $mnt->{mount_point};