Skip to content

Expected behavior for "directory to new directory" depends on trailing slash #1500

Open
@Github-dm-CDE

Description

@Github-dm-CDE

In Copying files and directories, 1f case "directory to new directory", it is stated that the trailing slashes in both source and target are optional. However, if source/subdir and target/newdir/ are being used, the resulting target structure is the following:

📁 target
 └── 📁 newdir
     └── 📁 subdir
          ├── 📄 subfile1
          ├── 📄 subfile2
          └── 📁 nesteddir
              └── 📄 nestedfile

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 the copy() method.

Is such output expected?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions