diff options
-rw-r--r-- | lbup/repository.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lbup/repository.py b/lbup/repository.py index 6b7c54b..76ec1fd 100644 --- a/lbup/repository.py +++ b/lbup/repository.py @@ -113,8 +113,11 @@ class Repo: backup_time = datetime.datetime.now(datetime.timezone.utc) - with open(os.path.join(data_dir, self.sizestat_name), 'a') as f: - f.write('%s %d\n' % (backup_time.isoformat(timespec = 'seconds'), size_post - size_pre)) + if not dry_run: + with open(os.path.join(data_dir, self.sizestat_name), 'a') as f: + f.write('%s %d\n' % + (backup_time.isoformat(timespec = 'seconds'), + size_post - size_pre)) result.target_results[tgt.name] = res |