From 40e3b00e9750af97ddb9a16ac7f2e1410afe2c4f Mon Sep 17 00:00:00 2001 From: paul Date: Wed, 14 Sep 2016 12:31:20 +0000 Subject: [PATCH] avoid even globs and use find for listings (because of arg/env limitation) svn path=/trunk/; revision=150 --- pages/list.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/list.sh b/pages/list.sh index c376d68..37f764e 100755 --- a/pages/list.sh +++ b/pages/list.sh @@ -95,9 +95,9 @@ VIDEOend genlist(){ case "$order" in - Date) stat -c '%Y %n' "${_DATA}"/videos/* |sort -r |sed -r 's;^.*/;;;' |egrep -i "$file_pattern";; + Date) find "${_DATA}"/videos/ -maxdepth 1 -mindepth 1 -printf '%T@ %f\n' |sort -r |cut -d\ -f2- |egrep -i "$file_pattern";; Length) sed -sn 1p "${_DATA}"/meta/*.meta |sort -n |sed -r 's;^[0-9\t]+\t;;';; - Name) printf '%s\n' "${_DATA}"/videos/* |sed -r 's;^.*/;;;' |egrep -i "$file_pattern";; + Name) find "${_DATA}"/videos/ -maxdepth 1 -mindepth 1 -printf '%f\n' |sort |egrep -i "$file_pattern";; esac } -- 2.39.2