Просмотр исходного кода

Fix an error in the LVM hook when removing a snapshot directory (#1071).

Dan Helfman 1 месяц назад
Родитель
Сommit
b01b8498aa
2 измененных файлов с 2 добавлено и 1 удалено
  1. 1 0
      NEWS
  2. 1 1
      borgmatic/hooks/data_source/lvm.py

+ 1 - 0
NEWS

@@ -3,6 +3,7 @@
    the fail state.
  * #1066: Add a "states" option to command hooks, so you can optionally skip an "after" hook if
    borgmatic encounters an error.
+ * #1071: Fix an error in the LVM hook when removing a snapshot directory.
 
 2.0.2
  * #1035: Document potential performance issues and workarounds with the ZFS, Btrfs, and LVM hooks:

+ 1 - 1
borgmatic/hooks/data_source/lvm.py

@@ -407,7 +407,7 @@ def remove_data_source_dumps(hook_config, config, borgmatic_runtime_directory, d
                 continue
 
         if not dry_run:
-            shutil.rmtree(snapshots_directory)
+            shutil.rmtree(snapshots_directory, ignore_errors=True)
 
     # Delete snapshots.
     lvremove_command = hook_config.get('lvremove_command', 'lvremove')