mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
Removing "ignore" of directory if it is deleted.
This commit is contained in:
parent
2c5da4b12d
commit
f0a4899336
1 changed files with 3 additions and 0 deletions
|
|
@ -186,6 +186,9 @@ async def delete(*paths: Union[str, pathlib.Path]):
|
|||
# File that will be deleted is in a Tagged FileGroup.
|
||||
raise FileGroupIsTagged(f"Cannot delete {file_group} because it is tagged")
|
||||
for path in paths:
|
||||
ignored_directories = get_wrolpi_config().ignored_directories
|
||||
if ignored_directories and str(path) in ignored_directories:
|
||||
remove_ignored_directory(path)
|
||||
if path.is_dir():
|
||||
delete_directory(path, recursive=True)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue