From 3c4941867aed0941e6c30048ee4430549e38fd04 Mon Sep 17 00:00:00 2001 From: lnx Date: Sun, 15 Oct 2023 16:21:31 +0300 Subject: [PATCH] Ticket #4507: shell VFS: incorrect file names with cyrillic or diacritic symbols. When using "Shell link", filenames with cyrillic or diacritic symbols are displayed as chains of numbers. The problem is due to Perl version. With Perl v5.36.0, there is no S_ISLNK in POSIX.pm. With Perl v5.38.0, there is S_ISLNK in POSIX.pm, so S_IMODE and S_IFMT are not imported from Fcntl due to condition unless defined &S_ISLNK. Signed-off-by: Andrew Borodin --- src/vfs/shell/helpers/ls | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/vfs/shell/helpers/ls b/src/vfs/shell/helpers/ls index 4c8ca21137..c7701d644f 100644 --- a/src/vfs/shell/helpers/ls +++ b/src/vfs/shell/helpers/ls @@ -122,9 +122,8 @@ SHELL_DIR=$1 perl -e ' use strict; use POSIX; -use Fcntl; -use POSIX ":fcntl_h"; #S_ISLNK was here until 5.6 -import Fcntl ":mode" unless defined &S_ISLNK; #and is now here +use Fcntl ":mode"; # S_ISLNK, S_IFMT, S_IMODE are here +use POSIX ":fcntl_h"; # S_ISLNK might be here as well my $dirname = $ARGV[0]; if (opendir (DIR, $dirname)) { while((my $filename = readdir (DIR))){