added missing file checking for rm_bg

This commit is contained in:
Ville Rantanen
2016-01-08 15:02:32 +02:00
parent 9869257aaa
commit 9583b1e170
2 changed files with 6 additions and 1 deletions

View File

@@ -13,7 +13,11 @@ tempfolders=()
for f in "$@"; do
d=$( readlink -nf $( dirname "$f" ) )/.rm_bg.$$
mkdir -p "$d"
mv $f "$d"/
[[ -e "$f" ]] || {
echo "$f" does not exist
continue
}
mv "$f" "$d"/
tempfolders+=( "$d" )
done