summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevan Franchini <twitch153@gentoo.org>2014-01-07 22:57:01 -0500
committerDevan Franchini <twitch153@gentoo.org>2014-01-24 22:14:58 -0500
commitd6a06ebe012ac80bf1ae57298116cdd8a63f454d (patch)
tree8191d7b72fc88e4994943765dcffa740634e5215 /WebappConfig
parentdoc/webapp-config.8.xml: Improves man page synopsis. (diff)
downloadwebapp-config-d6a06ebe012ac80bf1ae57298116cdd8a63f454d.tar.gz
webapp-config-d6a06ebe012ac80bf1ae57298116cdd8a63f454d.tar.bz2
webapp-config-d6a06ebe012ac80bf1ae57298116cdd8a63f454d.zip
WebappConfig/db.py: Slightly alters prune_database() algorithm.
When the prune_database() function checks to see if a webapp is installed in the directory the database says it's supposed to be installed in it originally checked to see if a .webapp file existed in the directory. But due to the fact that a .webapp file could exist in a directory and not be the webapp that is listed as installed in that directory it was decided that checking the existance of the .webapp-<webapp>-<version> file would be better as it confirms that a webapp exists in that directory and it is the webapp that it is supposed to be.
Diffstat (limited to 'WebappConfig')
-rw-r--r--WebappConfig/db.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/WebappConfig/db.py b/WebappConfig/db.py
index d22020a..228b2c8 100644
--- a/WebappConfig/db.py
+++ b/WebappConfig/db.py
@@ -444,9 +444,7 @@ class WebappDB(AppHierarchy):
for i in loc[j]:
appdir = i[3].strip()
# We check to see if the webapp is installed.
- # TODO: Fix algorithm to see if this is an outdated
- # entry.
- if not os.path.exists(appdir+'/.webapp'):
+ if not os.path.exists(appdir+'/.webapp-'+j):
if self.__v:
OUT.warn('No .webapp file found in dir: ')
OUT.warn(appdir)