tools/pyboard.py: Support Windows pathname separators.
Addresses issue #9132.
This commit is contained in:
parent
2d4e7e99bf
commit
57fd66b80f
@ -582,12 +582,12 @@ def filesystem_command(pyb, args, progress_callback=None, verbose=False):
|
|||||||
return src
|
return src
|
||||||
|
|
||||||
def fname_cp_dest(src, dest):
|
def fname_cp_dest(src, dest):
|
||||||
src = src.rsplit("/", 1)[-1]
|
_, src = os.path.split(src)
|
||||||
if dest is None or dest == "":
|
if dest is None or dest == "":
|
||||||
dest = src
|
dest = src
|
||||||
elif dest == ".":
|
elif dest == ".":
|
||||||
dest = "./" + src
|
dest = os.path.join(".", src)
|
||||||
elif dest.endswith("/"):
|
elif dest.endswith(os.path.sep):
|
||||||
dest += src
|
dest += src
|
||||||
return dest
|
return dest
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user