From 8768380b62525537e55def81c3273eeb4f9a88d3 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 11 Sep 2010 19:54:00 +0200 Subject: Fix check_repo_permission --- db-functions | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/db-functions b/db-functions index 4081d54..18029ee 100644 --- a/db-functions +++ b/db-functions @@ -402,12 +402,10 @@ check_repo_permission() { [ -w "$FTP_BASE/$(get_pkgpool_for_host)" ] || return 1 local arch - for arch in ${ARCHES} any; do - local w - local ws=("${FTP_BASE}/${repo}/os/${arch}/"{,${repo}${DBEXT}}) - for w in ws; do - [ -w ] || return 1 - done + for arch in ${ARCHES}; do + local dir="${FTP_BASE}/${repo}/os/${arch}/" + [ -w "${dir}" ] || return 1 + [ -f "${dir}"${repo}${DBEXT} -a ! -w "${dir}"${repo}${DBEXT} ] && return 1 done return 0 -- cgit v1.2.3-24-g4f1b