[Calypso-commits] [calypso] 02/02: Don't remove existing entries

Guido Guenther agx at moszumanska.debian.org
Sun Oct 23 09:53:54 UTC 2016


This is an automated email from the git hooks/post-receive script.

agx pushed a commit to branch master
in repository calypso.

commit 0d883ccf37617625d49eaf1180e75d4a831a4fa5
Author: Guido Günther <agx at sigxcpu.org>
Date:   Fri Oct 21 16:07:21 2016 +0200

    Don't remove existing entries
    
    Commit e7d713be18f20ef53a6271306baddb88cd68c2e0 switched from glob to
    listdir but listdir returns relative paths while glob uses absolute
    ones. The comparison always failed removing still wanted files.
---
 calypso/webdav.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/calypso/webdav.py b/calypso/webdav.py
index 0267825..107791a 100644
--- a/calypso/webdav.py
+++ b/calypso/webdav.py
@@ -344,8 +344,8 @@ class Collection(object):
                 else:
                     self.insert_directory("/".join([self.urlpath, filename]))
         for file in self.files:
-            if not file.path in filenames:
-                self.log.debug("Removed %s", file.path)
+            if os.path.basename(file.path) not in filenames:
+                self.log.debug("Removed %s %s", file.path)
                 self.remove_file(file.path)
         h = hashlib.sha1()
         for item in self.my_items:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/calypso/calypso.git



More information about the Calypso-commits mailing list