Fix deletion of old snapshots
Change-Id: If6368f813e23b504d30a5ac7036b86e66c5d1be7
diff --git a/trsync.py b/trsync.py
index 7e05b62..0a44f5d 100644
--- a/trsync.py
+++ b/trsync.py
@@ -158,7 +158,7 @@
self.timestamp.snapshot_stamp_format)
)
s_date = datetime.datetime.combine(s_date, datetime.time(0))
- s_path = self.url.a_dir(self.snapshot_dir, s)
+ s_path = self.url.a_file(self.snapshot_dir, s)
if s_date < warn_date:
s_links = [_[0] for _ in links
if _[1] == s
@@ -166,7 +166,6 @@
]
if not s_links:
self.rmdir(s_path)
- self.rmfile(s_path + '.target.txt')
self.rmfile(s_path + '.diff.txt')
else:
self.logger.info('Skip deletion of "{}" because there are '