diff options
Diffstat (limited to 'src/dir.sh')
-rw-r--r-- | src/dir.sh | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -65,10 +65,12 @@ try_rmdir() { local dir="${1}" - if dir_is_empty "${dir}"; then - rmdir "${dir}" - return ${?} - else + if ! dir_is_empty "${dir}"; then + return 1 + fi + if ! rmdir "${dir}"; then return 1 fi + + return 0 } |