w3m: Avoid depending on libgc-dev when building
[termux-packages] / packages / mc / mc-3611-fish-fix-perl-ls-helper.patch
CommitLineData
ea6cbe8f
FF
1From e274e58cb7dff1683480f5538fd1bfa41a85c0c7 Mon Sep 17 00:00:00 2001
2From: Andreas Mohr <and@gmx.li>
3Date: Sun, 13 Mar 2016 20:59:47 +0000
4Subject: [PATCH] Fish: fix perl ls helper
5
6With #3599 I introduce a perl warning in fish_list_perl()
7so fish_list_perl() was skipped (return code 255) and fallback ls
8function was used instead.
9
10Plus all % chars must quoted because of g_strconcat() after reading
11script file into string.
12
13Fix it!
14
15Signed-off-by: Andreas Mohr <and@gmx.li>
16---
17 src/vfs/fish/helpers/ls | 4 ++--
18 1 file changed, 2 insertions(+), 2 deletions(-)
19
20diff --git a/src/vfs/fish/helpers/ls b/src/vfs/fish/helpers/ls
21index 1284e17..909a77d 100755
22--- a/src/vfs/fish/helpers/ls
23+++ b/src/vfs/fish/helpers/ls
24@@ -138,8 +138,8 @@ while((my $filename = readdir (DIR))){
25 my $linkname = readlink ("$dirname/$filename");
26 $linkname =~ $strutils_shell_escape_regex;
27 printf("R%%o %%o $uid.$gid\nS$size\nd$mloctime\n:\"%%s\" -> \"%%s\"\n\n", S_IMODE($mode), S_IFMT($mode), $e_filename, $linkname);
28- } elseif (S_ISCHR ($mode) || S_ISBLK ($mode)) {
29- my $minor = $rdev % 256;
30+ } elsif (S_ISCHR ($mode) || S_ISBLK ($mode)) {
31+ my $minor = $rdev %% 256;
32 my $major = int( $rdev / 256 );
33 printf("R%%o %%o $uid.$gid\nE$major,$minor\nd$mloctime\n:\"%%s\"\n\n", S_IMODE($mode), S_IFMT($mode), $e_filename);
34 } else {