fix wrong dst path for source path under '/'

When a source file path is /FILE, its dest path would be dst/ILE.
This commit fixes this issue (#8).
This commit is contained in:
Ryo Nakamura
2024-01-11 12:53:34 +09:00
parent 4b34118a88
commit 5cbf3ad648
3 changed files with 16 additions and 6 deletions

View File

@@ -216,7 +216,7 @@ def test_copy_file_under_root_to_dir(mscp, src_prefix, dst_prefix):
dst_prefix + os.path.dirname(dst.path)])
assert check_same_md5sum(src, dst)
src.cleanup()
dst.cleanup()
dst.cleanup(preserve_dir = True)
@pytest.mark.parametrize("src_prefix, dst_prefix", param_remote_prefix)