Skip to content

Commit

Permalink
Ticket #4507: shell VFS: incorrect file names with cyrillic or diacri…
Browse files Browse the repository at this point in the history
…tic 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 <[email protected]>
  • Loading branch information
lnxlv authored and aborodin committed Oct 15, 2023
1 parent 74d9f24 commit 3c49418
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/vfs/shell/helpers/ls
Original file line number Diff line number Diff line change
Expand Up @@ -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))){
Expand Down

0 comments on commit 3c49418

Please sign in to comment.