1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-02-26 16:04:06 +00:00

Merge pull request #7267 from ThomasWaldmann/recreate-with-target-master

recreate: when --target is given, do not detect "nothing to do"
This commit is contained in:
TW 2023-01-16 17:23:38 +01:00 committed by GitHub
commit 3992c1c333
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2259,7 +2259,14 @@ def recreate(self, archive_name, comment=None, target_name=None):
target = self.create_target(archive, target_name)
if self.exclude_if_present or self.exclude_caches:
self.matcher_add_tagged_dirs(archive)
if self.matcher.empty() and not self.recompress and not target.recreate_rechunkify and comment is None:
if (
self.matcher.empty()
and not self.recompress
and not target.recreate_rechunkify
and comment is None
and target_name is None
):
# nothing to do
return False
self.process_items(archive, target)
replace_original = target_name is None