From 99168c103567306f8ffd158fc9bf4a41a8559d4f Mon Sep 17 00:00:00 2001 From: Raphael Heinrich Date: Mon, 25 Nov 2019 22:07:42 +0100 Subject: [PATCH] Fix error on cleanup multiple database dumps --- borgmatic/hooks/dump.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/borgmatic/hooks/dump.py b/borgmatic/hooks/dump.py index d0c32e9..38905ef 100644 --- a/borgmatic/hooks/dump.py +++ b/borgmatic/hooks/dump.py @@ -71,10 +71,10 @@ def remove_database_dumps(dump_path, databases, database_type_name, log_prefix, continue os.remove(dump_filename) - dump_path = os.path.dirname(dump_filename) + dump_file_dir = os.path.dirname(dump_filename) - if len(os.listdir(dump_path)) == 0: - os.rmdir(dump_path) + if len(os.listdir(dump_file_dir)) == 0: + os.rmdir(dump_file_dir) def convert_glob_patterns_to_borg_patterns(patterns):