View | Details | Raw Unified | Return to bug 208104
Collapse All | Expand All

(-)misc/mc/Makefile (-1 / +1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	mc
4
PORTNAME=	mc
5
PORTVERSION=	4.8.16
5
PORTVERSION=	4.8.16
6
PORTREVISION=	2
6
PORTREVISION=	3
7
CATEGORIES=	misc shells
7
CATEGORIES=	misc shells
8
MASTER_SITES=	http://ftp.midnight-commander.org/ \
8
MASTER_SITES=	http://ftp.midnight-commander.org/ \
9
		http://ftp.osuosl.org/pub/midnightcommander/ \
9
		http://ftp.osuosl.org/pub/midnightcommander/ \
(-)misc/mc/files/patch-upstreamticket3611-fish-fix-perl-ls-helper.patch (+34 lines)
Line 0 Link Here
1
From e274e58cb7dff1683480f5538fd1bfa41a85c0c7 Mon Sep 17 00:00:00 2001
2
From: Andreas Mohr <and@gmx.li>
3
Date: Sun, 13 Mar 2016 20:59:47 +0000
4
Subject: [PATCH] Fish: fix perl ls helper
5
6
With #3599 I introduce a perl warning in fish_list_perl()
7
so fish_list_perl() was skipped (return code 255) and fallback ls
8
function was used instead.
9
10
Plus all % chars must quoted because of g_strconcat() after reading
11
script file into string.
12
13
Fix it!
14
15
Signed-off-by: Andreas Mohr <and@gmx.li>
16
---
17
 src/vfs/fish/helpers/ls | 4 ++--
18
 1 file changed, 2 insertions(+), 2 deletions(-)
19
20
diff --git a/src/vfs/fish/helpers/ls b/src/vfs/fish/helpers/ls
21
index 1284e17..909a77d 100755
22
--- src/vfs/fish/helpers/ls
23
+++ 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 {

Return to bug 208104