Fix for issue #81

See details in #81
This commit is contained in:
japm48 2017-08-20 06:55:59 +02:00 committed by GitHub
parent 4b5b6c44d3
commit 8e3a5dbf47
1 changed files with 4 additions and 4 deletions

8
yadm
View File

@ -178,7 +178,7 @@ function alt() {
if [[ ! $glob =~ ^# && ! $glob =~ ^[[:space:]]*$ ]] ; then
# echo "working on ->$glob<-"
local IFS=$'\n'
for matching_file in $(eval "$LS_PROGRAM" "$glob" 2>/dev/null); do
for matching_file in $(eval "$LS_PROGRAM" -d "$glob" 2>/dev/null); do
ENC_FILES[$index]="$matching_file"
((index++))
done
@ -447,7 +447,7 @@ function encrypt() {
while IFS='' read -r glob || [ -n "$glob" ]; do
if [[ ! $glob =~ ^# && ! $glob =~ ^[[:space:]]*$ ]] ; then
local IFS=$'\n'
for matching_file in $(eval "$LS_PROGRAM" "$glob" 2>/dev/null); do
for matching_file in $(eval "$LS_PROGRAM" -d "$glob" 2>/dev/null); do
ENC_FILES[$index]="$matching_file"
((index++))
done
@ -456,7 +456,7 @@ function encrypt() {
#; report which files will be encrypted
echo "Encrypting the following files:"
"$LS_PROGRAM" -1 "${ENC_FILES[@]}"
"$LS_PROGRAM" -1 -d "${ENC_FILES[@]}"
echo
#; encrypt all files which match the globs
@ -688,7 +688,7 @@ function perms() {
if [ -f "$YADM_ENCRYPT" ] ; then
while IFS='' read -r glob || [ -n "$glob" ]; do
if [[ ! $glob =~ ^# ]] ; then
GLOBS=("${GLOBS[@]}" $(eval "$LS_PROGRAM" "$glob" 2>/dev/null))
GLOBS=("${GLOBS[@]}" $(eval "$LS_PROGRAM" -d "$glob" 2>/dev/null))
fi
done < "$YADM_ENCRYPT"
fi