mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Improve backup exclude filters (#141311)
* Improve backup exclude filters * Add comment
This commit is contained in:
@@ -1726,7 +1726,9 @@ class CoreBackupReaderWriter(BackupReaderWriter):
|
||||
"""Filter to filter excludes."""
|
||||
|
||||
for exclude in excludes:
|
||||
if not path.match(exclude):
|
||||
# The home assistant core configuration directory is added as "data"
|
||||
# in the tar file, so we need to prefix that path to the filters.
|
||||
if not path.full_match(f"data/{exclude}"):
|
||||
continue
|
||||
LOGGER.debug("Ignoring %s because of %s", path, exclude)
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user