mirror of https://github.com/pixelfed/pixelfed.git
make directory-is-empty more robust
This commit is contained in:
parent
f86fe41964
commit
89adbd0fd0
|
@ -326,7 +326,7 @@ function file-exists()
|
|||
# @exitcode 1 If $1 does *NOT* contain files
|
||||
function directory-is-empty()
|
||||
{
|
||||
[ -z "$(ls -A "${1}")" ]
|
||||
path-exists "${1}" && [[ -z "$(ls -A "${1}")" ]]
|
||||
}
|
||||
|
||||
# @description Ensures a directory exists (via mkdir)
|
||||
|
|
Loading…
Reference in New Issue