When a destination directory dst is empty, copy a file test as a different name asdf/ under the directory dst fails: mscp created a directory dst/asdf and then exited with the error:
ryzen1 ~/w/m/build > ./mscp test localhost:dst/asdf/
thread[0]: copy failed: test -> dst/asdf/, 0x0000000000-0x0000100000, [path.c:311:touch_dst_path] mscp_open dst/asdf/: Transport endpoint is not connected
[ ] 0% 0.0B /1.0MB 0.0B/s --:-- ETA
2.1. After that, copy the file test with the same destination path dst/asdf/ works: test is coppied as dst/asdf/test (because the directory dst/asdf/ already exists):
ryzen1 ~/w/m/build > ./mscp test localhost:dst/asdf/
[=============================================] 100% 1024.0KB/1.0MB 8.6MB/s 00:00
ryzen1 ~/w/m/build > ls ~/dst/asdf 0.386s dev 16:24
test
The expected behavior is that when the destination path is dst/asdf/ on the case 2, mscp should create the directory dst/asdf and copy test to dst/asdf/test.
dst
is empty, copy a filetest
as a different nameasdf
under the directorydst
works.dst
is empty, copy a filetest
as a different nameasdf/
under the directorydst
fails: mscp created a directorydst/asdf
and then exited with the error:2.1. After that, copy the file
test
with the same destination pathdst/asdf/
works:test
is coppied asdst/asdf/test
(because the directorydst/asdf/
already exists):The expected behavior is that when the destination path is
dst/asdf/
on the case 2, mscp should create the directorydst/asdf
and copytest
todst/asdf/test
.