Skip to content

Commit 723f0b9

Browse files
fix: fix the remote path in SSH when local is Windows (#472)
Fix #471. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Improvements** - Enhanced file path handling for better cross-platform compatibility in the upload process. - Improved robustness of temporary file path generation for SHA256 checks and file listings. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Jinzhe Zeng <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 1e9eb06 commit 723f0b9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dpdispatcher/contexts/ssh_context.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -636,9 +636,9 @@ def upload(
636636
).as_posix()
637637
sha256_list.append(f"{sha256} {jj_rel}")
638638
# write to remote
639-
sha256_file = os.path.join(
640-
self.remote_root, ".tmp.sha256." + str(uuid.uuid4())
641-
)
639+
sha256_file = pathlib.PurePath(
640+
os.path.join(self.remote_root, ".tmp.sha256." + str(uuid.uuid4()))
641+
).as_posix()
642642
self.write_file(sha256_file, "\n".join(sha256_list))
643643
# check sha256
644644
# `:` means pass: https://stackoverflow.com/a/2421592/9567349

0 commit comments

Comments
 (0)