Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion solvebio/cli/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,21 @@ def _upload_folder(
for abs_local_parent_path, folders, files in os.walk(base_local_path):
# Strips off the local path and adds the parent directory at
# each phase of the loop
base_local_path_dirname = os.path.dirname(base_local_path)
if os.name == "nt":
base_local_path_dirname = re.escape(os.path.dirname(base_local_path))
local_parent_path = re.sub(
"^" + os.path.dirname(base_local_path), "", abs_local_parent_path
"^" + base_local_path_dirname, "", abs_local_parent_path
).lstrip("/")

if should_exclude(abs_local_parent_path, exclude_paths, dry_run=dry_run):
continue

remote_folder_full_path = os.path.join(base_remote_path, local_parent_path)

if os.name == "nt":
remote_folder_full_path = base_remote_path + "/" + local_parent_path.lstrip("\\").replace("\\", "/")

# Create folders
for folder in folders:
new_folder_path = os.path.join(abs_local_parent_path, folder)
Expand Down
Loading