From 76cf69fa17fe615da2f768ef736f37403f89d0c8 Mon Sep 17 00:00:00 2001
From: Mooffie <mooffie@gmail.com>
Date: Mon, 19 Dec 2016 02:56:39 +0200
Subject: [PATCH 1/2] Ticket #3744: extfs: u7z: make it testable.
---
src/vfs/extfs/helpers/u7z | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/vfs/extfs/helpers/u7z b/src/vfs/extfs/helpers/u7z
index 5caa90f..04f3f9c 100755
a
|
b
|
|
19 | 19 | |
20 | 20 | P7ZIP=`which 7z 2>/dev/null` || P7ZIP=`which 7za 2>/dev/null` || P7ZIP=`which 7zr 2>/dev/null` || P7ZIP="" |
21 | 21 | |
| 22 | # Let the test framework hook in: |
| 23 | P7ZIP=${MC_TEST_EXTFS_LIST_CMD:-$P7ZIP} |
| 24 | STAT=${MC_TEST_EXTFS_U7Z_STAT:-stat} |
| 25 | |
22 | 26 | mcu7zip_list () |
23 | 27 | { |
24 | 28 | # Symlinks are not shown - no idea how to distinguish them |
… |
… |
mcu7zip_list () |
35 | 39 | zero_size=' 0' |
36 | 40 | |
37 | 41 | # archive entries can have no datetime info, 7z will use archive file datetime |
38 | | date_archive=`stat -c %y "$1" 2>/dev/null | sed -n "s/${date_re}.*/${date_mc}/p" 2>/dev/null` |
| 42 | date_archive=`$STAT -c %y "$1" 2>/dev/null | sed -n "s/${date_re}.*/${date_mc}/p" 2>/dev/null` |
39 | 43 | [ "${date_archive}"x = x ] && date_archive=`ls -lan "$1" 2>/dev/null | awk '{print $6, $7, $8}' 2>/dev/null` |
40 | 44 | [ "${date_archive}"x = x ] && date_archive="01-01-1970 00:00:00" |
41 | 45 | |