From bdf9ddc79067dab28b4ac046606c56df3996132c Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Sat, 26 Dec 2020 21:20:32 +0100 Subject: [PATCH] fish: Fix STAT / KIO::stat("fish://localhost") returned a "regular file" with a MIME type of "inode/directory". This is because it did chdir("/") and then lstat(""). Fix this by using "." instead of an empty string in that case. --- fish/fish.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/fish/fish.pl b/fish/fish.pl index 678d6cc73..0207cf4d8 100755 --- a/fish/fish.pl +++ b/fish/fish.pl @@ -223,6 +223,7 @@ sub list { my $cwd = getcwd(); chdir($dn) || do { print "### 500 $!\n"; return; }; foreach (@entries) { + $_ = '.' if (!length($_)); my $link = readlink; my ($mode,$uid,$gid,$size,$mtime) = (lstat)[2,4,5,7,9]; print filetype($mode,$link,$uid,$gid); -- GitLab