Browse Source

sde-reschedule: silence ENOTDIR errors from rmdir()

and sightly refactor the remove_package() function
stable/0.6
Alejandro Mery 11 years ago
parent
commit
f27f65e18e
1 changed files with 3 additions and 5 deletions
  1. +3
    -5
      bin/sde-reschedule-package

+ 3
- 5
bin/sde-reschedule-package

@ -104,12 +104,10 @@ remove_package() {
echo_warning "$pkg: missing filename in $flist"
else
f="$root/$f"
if [ -L "$f" ]; then
rm -f "$f"
elif [ -d "$f" ]; then
rmdir "$f"
if [ ! -L "$f" -a -d "$f" ]; then
rmdir --ignore-fail-on-non-empty -- "$f"
else
rm -f "$f"
rm -f -- "$f"
fi
fi
done

Loading…
Cancel
Save