diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-04-25 18:17:34 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-04-25 18:17:34 (EDT) |
commit | 7309686ac2456331cb0e5c54c1f4ceac996ba549 (patch) | |
tree | 4a14f6bac4a151e27837c217d01ff6dbe0ecb201 | |
parent | c41d4889f85d2143aaf21adfce2aacf84b8c992f (diff) |
dir_is_empty(): Move shift and remove duplicate pattern
Also update copyright notice.
-rw-r--r-- | src/dir.sh | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,6 +1,6 @@ # Miscellaneous directory-related functions # -# Copyright (C) 2013, 2014 Patrick "P. J." McDermott +# Copyright (C) 2013, 2014 Patrick McDermott # # This file is part of the ProteanOS Development Kit. # @@ -21,11 +21,11 @@ dir_is_empty() { local dir="${1}" + shift 1 local ret= local dirent= local exclude= local exclusion= - shift 1 ret=0 @@ -35,7 +35,7 @@ dir_is_empty() # and aren't ".." # .??* dirents whose names start with "." and are three or more # characters long - for dirent in "${dir}/"* "${dir}/".[!.] "${dir}/".[!.] "${dir}/".??*; do + for dirent in "${dir}/"* "${dir}/".[!.] "${dir}/".??*; do if ! [ -e "${dirent}" ]; then continue fi |