tools/mpremote: Handle `cp` without destination.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
pull/11659/head
Jim Mussared 2023-05-31 11:16:34 +10:00 zatwierdzone przez Damien George
rodzic 46715e370d
commit b6b19798c2
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -686,6 +686,10 @@ def filesystem_command(pyb, args, progress_callback=None, verbose=False):
args = args[1:]
try:
if cmd == "cp":
if len(args) == 1:
raise PyboardError(
"cp: missing destination file operand after '{}'".format(args[0])
)
srcs = args[:-1]
dest = args[-1]
if dest.startswith(":"):