diff -r 2da7f3ec4e6f -r 4b860903d8c7 devtools/__init__.py --- a/devtools/__init__.py Wed Apr 13 09:58:19 2011 +0200 +++ b/devtools/__init__.py Wed Apr 13 11:34:53 2011 +0200 @@ -299,9 +299,12 @@ def absolute_backup_file(self, db_id, suffix): """Path for config backup of a given database id""" - dbname = self.dbname.replace('-', '_') + # in case db name is an absolute path, we don't want to replace anything + # in parent directories + directory, basename = split(self.dbname) + dbname = basename.replace('-', '_') assert '.' not in db_id - filename = '%s-%s.%s' % (dbname, db_id, suffix) + filename = join(directory, '%s-%s.%s' % (dbname, db_id, suffix)) return join(self._ensure_test_backup_db_dir(), filename) def db_cache_key(self, db_id, dbname=None):