From 3df0bb5425b5988f1439a462bb5ff9484b1cd63c Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Wed, 6 Jan 2010 07:06:17 +0100 Subject: Fix and further improve write permission checks --- layman/db.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/layman/db.py b/layman/db.py index 58b6b8d..7d7afad 100644 --- a/layman/db.py +++ b/layman/db.py @@ -266,12 +266,12 @@ class RemoteDB(Overlays): mpath = self.path(url) # Check for sufficient privileges - if not os.access(mpath, os.W_OK): - OUT.warn('You do not have permission to update the cache.') + if os.path.exists(mpath) and not os.access(mpath, os.W_OK): + OUT.warn('You do not have permission to update the cache (%s).' % mpath) import getpass if getpass.getuser() != 'root': OUT.warn('Hint: You are not root.') - return + continue try: -- cgit v1.2.3-1-g7c22