mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
make directory-is-empty more robust
This commit is contained in:
parent
ca5710b5ae
commit
1616c7cb11
1 changed files with 1 additions and 1 deletions
|
@ -324,7 +324,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 a new issue