Skip to content

Commit 8b67476

Browse files
committed
Fix upload_file path resolution to expand user directory
1 parent 7135372 commit 8b67476

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

evil_winrm_py/evil_winrm_py.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,9 @@ def interactive_shell(r_pool: RunspacePool) -> None:
910910
if remote_path.endswith("\\"):
911911
remote_path = f"{remote_path}{file_name}"
912912

913-
upload_file(r_pool, str(Path(local_path).resolve()), remote_path)
913+
upload_file(
914+
r_pool, str(Path(local_path).expanduser().resolve()), remote_path
915+
)
914916
continue
915917
elif command_lower.startswith("loadps"):
916918
command_parts = quoted_command_split(command)

0 commit comments

Comments
 (0)