@@ -201,7 +201,7 @@ def find_files(self, path: str) -> List[str]:
201
201
202
202
for glob_file in glob_files :
203
203
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 ( " \\ " , "/" ) )
205
205
206
206
glob_end = time .time ()
207
207
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,
290
290
[(field_name, (filename, file_object)), ...]
291
291
"""
292
292
send_files = []
293
-
293
+ if "\\ " in workspace :
294
+ workspace = workspace .replace ("\\ " , "/" )
294
295
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 )
299
297
300
298
if file_path .startswith (workspace ):
301
299
key = file_path [len (workspace ):]
@@ -306,7 +304,7 @@ def load_files_for_sending(files: List[str], workspace: str) -> List[Tuple[str,
306
304
key = key .lstrip ("./" )
307
305
308
306
f = open (file_path , 'rb' )
309
- payload = (key , (name , f ))
307
+ payload = (key , (name . lstrip ( workspace ) , f ))
310
308
send_files .append (payload )
311
309
312
310
return send_files
0 commit comments