summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2011-08-08 17:38:43 +0100
committerLars Wirzenius <liw@liw.fi>2011-08-08 17:38:43 +0100
commita9bc9080137e5add15c81f6071567caa67a9f91b (patch)
tree488646f7d233119441cf93d07e41b74d9eb2be3b
parent5db87ac9baa89522601f03c6ec7b412cab6961dd (diff)
downloadobnam-a9bc9080137e5add15c81f6071567caa67a9f91b.tar.gz
Fix backup to count all files, not just backed up files.
The previous behavior was confusing to users, who thought the file count was the total file count. Now it is.
-rw-r--r--obnamlib/plugins/backup_plugin.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/obnamlib/plugins/backup_plugin.py b/obnamlib/plugins/backup_plugin.py
index c0abb56d..7e9eff59 100644
--- a/obnamlib/plugins/backup_plugin.py
+++ b/obnamlib/plugins/backup_plugin.py
@@ -110,8 +110,6 @@ class BackupPlugin(obnamlib.ObnamPlugin):
self.root_metadata = self.fs.lstat(absroot)
for pathname, metadata in self.find_files(absroot):
logging.debug('Backing up %s' % pathname)
- self.app.hooks.call('progress-found-file',
- pathname, metadata)
try:
if stat.S_ISDIR(metadata.st_mode):
self.backup_dir_contents(pathname)
@@ -193,6 +191,7 @@ class BackupPlugin(obnamlib.ObnamPlugin):
tracing.trace('considering %s' % pathname)
try:
metadata = obnamlib.read_metadata(self.fs, pathname)
+ self.app.hooks.call('progress-found-file', pathname, metadata)
if self.needs_backup(pathname, metadata):
yield pathname, metadata
except BaseException, e: