Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/repo-add.sh.in6
1 files changed, 6 insertions, 0 deletions
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