@@ -201,7 +201,7 @@ def find_files(self, path: str) -> List[str]:
201201
202202 for glob_file in glob_files :
203203 if os .path .isfile (glob_file ) and not Core .is_excluded (glob_file , self .config .excluded_dirs ):
204- files .add (glob_file )
204+ files .add (glob_file . replace ( " \\ " , "/" ) )
205205
206206 glob_end = time .time ()
207207 log .debug (f"Globbing took { glob_end - glob_start :.4f} seconds" )
@@ -290,12 +290,10 @@ def load_files_for_sending(files: List[str], workspace: str) -> List[Tuple[str,
290290 [(field_name, (filename, file_object)), ...]
291291 """
292292 send_files = []
293-
293+ if "\\ " in workspace :
294+ workspace = workspace .replace ("\\ " , "/" )
294295 for file_path in files :
295- if "/" in file_path :
296- _ , name = file_path .rsplit ("/" , 1 )
297- else :
298- name = file_path
296+ _ , name = file_path .rsplit ("/" , 1 )
299297
300298 if file_path .startswith (workspace ):
301299 key = file_path [len (workspace ):]
@@ -306,7 +304,7 @@ def load_files_for_sending(files: List[str], workspace: str) -> List[Tuple[str,
306304 key = key .lstrip ("./" )
307305
308306 f = open (file_path , 'rb' )
309- payload = (key , (name , f ))
307+ payload = (key , (name . lstrip ( workspace ) , f ))
310308 send_files .append (payload )
311309
312310 return send_files
0 commit comments