Skip to content

Commit d83533e

Browse files
changes
1 parent 9ec2139 commit d83533e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

__main__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,11 @@ def push():
6767
for file in files:
6868
local_file_path = path.join(root, file)
6969
relative_path = path.relpath(local_file_path, copy_dir)
70-
remote_file_path = path.join(remote_path, relative_path)
70+
remote_file_path = path.join(remote_path, relative_path).replace("\\", "/")
71+
remote_dir_path = path.dirname(remote_file_path)
7172
try:
73+
if not client.is_dir(remote_dir_path):
74+
client.makedirs(remote_dir_path) # Create parent directories if they don't exist
7275
client.upload_file(remote_file_path, local_file_path)
7376
click.echo(f"Uploaded: {relative_path}")
7477
except Exception as e:

0 commit comments

Comments
 (0)