Skip to content

Commit

Permalink
Merge pull request #587 from truenas/NAS-127325
Browse files Browse the repository at this point in the history
NAS-127325 / 24.04-RC.1 / Properly cleanup old manifest from the cloned `/data` directory
  • Loading branch information
yocalebo authored Feb 14, 2024
2 parents a64fae0 + 1827421 commit 6e6a6df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion truenas_install/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,12 +464,14 @@ def main():
for excluded in data_exclude:
remove = f"{root}/{excluded}"
try:
shutil.rmtree(remove, True)
shutil.rmtree(remove)
except NotADirectoryError:
try:
os.unlink(remove)
except FileNotFoundError:
pass
except FileNotFoundError:
pass

exclude_list = []
for walk_root, dirs, files in os.walk(root):
Expand Down

0 comments on commit 6e6a6df

Please sign in to comment.