-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expected behavior for "directory to new directory" depends on trailing slash #1500
Comments
Yes, this sounds exactly as designed, and what you would expect with a posix CLI. It also depends on whether the target directory already exists or not. |
Is then the behaviour specified in the documentation for single source to single target case 1f. Directory to new directoy incorrect @martindurant? Here the documentation specifies an expected output of:
|
This path contains a terminal "/", so that is probably the difference. It would be best to make the cases with and without, versus expectations, test cases to be fixed. This is obviously not simple territory. |
The difference is definitely the trailing slash in the source path. The thing is that the documentation explicitly states
So the first thing to clarify would be whether there is a problem in the documentation or in the implementation. |
I think that the documentation is correct, after all. There are test cases that are supposed to test that trailing slashes are optional. Those tests were not executed, however. After enabling them they fail in accordance with the issue reported here. |
In Copying files and directories, 1f case "directory to new directory", it is stated that the trailing slashes in both
source
andtarget
are optional. However, ifsource/subdir
andtarget/newdir/
are being used, the resulting target structure is the following:Basically the
subdir
folder itself is taken too, not only its content.This can be reproduced e.g. out of the box with
LocalFileSystem()
and thecopy()
method.Is such output expected?
The text was updated successfully, but these errors were encountered: