Skip to content

Commit

Permalink
create missing dirs when symlinking files
Browse files Browse the repository at this point in the history
  • Loading branch information
tykling committed Dec 17, 2024
1 parent 4d52939 commit 0b7c7dd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/bma_client_lib/bma_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ def upload_file(self, path: Path, attribution: str, file_license: str) -> dict[s
# create symlink to file in workdir
workpath = self.path / r.json()["bma_response"]["links"]["downloads"]["original"][1:]
if not workpath.exists():
workpath.parent.mkdir(exist_ok=True)
workpath.symlink_to(path)

return r.json() # type: ignore[no-any-return]
Expand Down

0 comments on commit 0b7c7dd

Please sign in to comment.