File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -262,6 +262,8 @@ Examples
262
262
263
263
mpremote cp main.py :
264
264
265
+ mpremote cp :a.py :b.py
266
+
265
267
mpremote cp -r dir/ :
266
268
267
269
mpremote cp a.py b.py : + repl
Original file line number Diff line number Diff line change @@ -333,10 +333,15 @@ def _list_recursive(files, path):
333
333
if fs_args [0 ] == "cp" and fs_args [1 ] == "-r" :
334
334
fs_args .pop (0 )
335
335
fs_args .pop (0 )
336
- assert fs_args [- 1 ] == ":"
336
+ if fs_args [- 1 ] != ":" :
337
+ print (f"{ _PROG } : 'cp -r' destination must be ':'" )
338
+ sys .exit (1 )
337
339
fs_args .pop ()
338
340
src_files = []
339
341
for path in fs_args :
342
+ if path .startswith (":" ):
343
+ print (f"{ _PROG } : 'cp -r' source files must be local" )
344
+ sys .exit (1 )
340
345
_list_recursive (src_files , path )
341
346
known_dirs = {"" }
342
347
pyb .exec_ ("import uos" )
You can’t perform that action at this time.
0 commit comments