make directory-is-empty more robust

pull/4844/head
Christian Winther 2024-01-26 20:45:56 +00:00
rodzic ca5710b5ae
commit 1616c7cb11
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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)