Skip to content

Commit

Permalink
fix problem of broken links after moving storage
Browse files Browse the repository at this point in the history
  • Loading branch information
hasan7n committed Dec 19, 2023
1 parent 8e24ec3 commit 3a51156
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli/medperf/comms/entity_resources/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def get_cube_image(url: str, cube_path: str, hash_value: str = None) -> str:
image_cube_path = os.path.join(cube_path, image_path)
os.makedirs(image_cube_path, exist_ok=True)
image_cube_file = os.path.join(image_cube_path, image_name)
if os.path.exists(image_cube_file):
if os.path.islink(image_cube_file): # could be a broken link
# Remove existing links
os.unlink(image_cube_file)

Expand Down

0 comments on commit 3a51156

Please sign in to comment.