File tree Expand file tree Collapse file tree 1 file changed +5
-15
lines changed
Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -66,21 +66,11 @@ def push():
6666 remote_path = repo_config ["path" ]
6767
6868 def ensure_remote_directory (remote_dir ):
69- # Always ensure the remote directory path ends with a slash
70- if not remote_dir .endswith ('/' ):
71- remote_dir += '/'
72- parts = remote_dir .split ('/' )
73- current = ""
74- for part in parts :
75- if part : # skip empty parts from leading '/'
76- current += "/" + part
77- # Always check with trailing slash so that it is recognized as a directory.
78- current_slash = current + "/"
79- if not client .is_dir (current_slash ):
80- try :
81- client .mkdir (current_slash )
82- except Exception as e :
83- click .echo (click .style (f"Error creating directory { current_slash } : { e } " , fg = "red" ))
69+ try :
70+ client .mkdir (remote_dir )
71+ except Exception as e :
72+ pass
73+
8474
8575 for root , _ , files in os .walk (copy_dir ):
8676 for file in files :
You can’t perform that action at this time.
0 commit comments