index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dave Reisner <d@falconindy.com> | 2011-06-20 11:05:08 -0400 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-06-20 11:22:39 -0500 |
commit | b8990993271b34d309ada49197090895b0fbdfb6 (patch) | |
tree | 9aec576561a7b6c2a0fbae08aaf294484e299ed6 /scripts/repo-add.sh.in | |
parent | ee638415e305a390cbf3fa68fb2a1fb5523f18e9 (diff) |
-rw-r--r-- | scripts/repo-add.sh.in | 6 |
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in index 0ea8e5bd..14506dcf 100644 --- a/scripts/repo-add.sh.in +++ b/scripts/repo-add.sh.in @@ -382,6 +382,12 @@ db_remove_entry() { check_repo_db() { + # ensure the path to the DB exists + if [[ ! -d "${LOCKFILE%/*}" ]]; then + error "$(gettext "%s does not exist or is not a directory.")" "${LOCKFILE%/*}" + exit 1 + fi + # check lock file if ( set -o noclobber; echo "$$" > "$LOCKFILE") 2> /dev/null; then CLEAN_LOCK=1 |