|
@@ -299,8 +299,10 @@ def remove_data_source_dumps(hook_config, config, borgmatic_runtime_directory, d
|
|
|
logger.debug(error)
|
|
|
return
|
|
|
|
|
|
- # Remove snapshot parent directory if it still exists (might not exist if snapshot was for '/')
|
|
|
+ # Remove the snapshot parent directory if it still exists. (It might not exist if the
|
|
|
+ # snapshot was for "/".)
|
|
|
snapshot_parent_dir = snapshot_path.rsplit(subvolume.path, 1)[0]
|
|
|
+
|
|
|
if os.path.isdir(snapshot_parent_dir):
|
|
|
shutil.rmtree(snapshot_parent_dir)
|
|
|
|