open_download: Allow download dir to be a symlink

This commit is contained in:
Thorsten Wißmann 2015-09-17 10:24:23 +02:00
parent b8f200b370
commit 9e25e3b96b

View File

@ -71,7 +71,9 @@ crop-first-column() {
} }
ls-files() { ls-files() {
ls -Q --quoting-style escape -h -o -1 -A -t "${DOWNLOAD_DIR}" \ # add the slash at the end of the download dir enforces to follow the
# symlink, if the DOWNLOAD_DIR itself is a symlink
ls -Q --quoting-style escape -h -o -1 -A -t "${DOWNLOAD_DIR}/" \
| grep '^[-]' \ | grep '^[-]' \
| cut -d' ' -f3- \ | cut -d' ' -f3- \
| sed 's,^\(.*[^\]\) \(.*\)$,\2\t\1,' \ | sed 's,^\(.*[^\]\) \(.*\)$,\2\t\1,' \