Skip to content

Commit

Permalink
Fix azure fileshare uploading of directories (#506)
Browse files Browse the repository at this point in the history
Fix for #505 when parent folders do not exist in the remote file share
yet during an upload.

Co-authored-by: Eu Jing Chua <eujingchua@microsoft.com>
  • Loading branch information
eujing and Eu Jing Chua authored Sep 7, 2023
1 parent 20e72f4 commit 6a337d4
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,7 @@ def _upload(self, local_path: str, remote_path: str, recursive: bool, seen: Set[
seen.add(local_path)

if os.path.isdir(local_path):
dir_client = self._share_client.get_directory_client(remote_path)
if not dir_client.exists():
dir_client.create_directory()
self._remote_makedirs(remote_path)
for entry in os.scandir(local_path):
name = entry.name
local_target = f"{local_path}/{name}"
Expand Down

0 comments on commit 6a337d4

Please sign in to comment.