Skip to content

copyto fails to copy empty directory. Related to #1837. #2629

Closed

Description

@ipod825

What is your rclone version (output from rclone version)

$ rclone --version
rclone v1.43
- os/arch: linux/amd64
- go version: go1.11

The command you were trying to run (eg rclone copy /tmp remote:tmp)

$ mkdir -p src/a
$ mkdir dst
$ rclone copyto src/a dst/a
$ ls dst
$

A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)

rclone -vv copyto src/a dst/a
2018/10/06 18:24:22 DEBUG : rclone: Version "v1.43.1" starting with parameters ["rclone" "-vv" "copyto" "src/a" "dst/a"]
2018/10/06 18:24:22 DEBUG : Using config file from "/home/mingo/.config/rclone/rclone.conf"
2018/10/06 18:24:22 INFO  : Local file system at /tmp/dst/a: Waiting for checks to finish
2018/10/06 18:24:22 INFO  : Local file system at /tmp/dst/a: Waiting for transfers to finish
2018/10/06 18:24:22 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 0
Checks:                 0 / 0, -
Transferred:            0 / 0, -
Elapsed time:       200ms

2018/10/06 18:24:22 DEBUG : 3 go routines active
2018/10/06 18:24:22 DEBUG : rclone: Version "v1.43.1" finishing with parameters ["rclone" "-vv" "copyto" "src/a" "dst/a"]

Activity

  1. self-assigned this
    on Oct 12, 2018
  2. added this to the v1.45 milestone on Oct 14, 2018
  3. modified the milestones: v1.45, v1.46 on Nov 24, 2018
  4. modified the milestones: v1.46, v1.47 on Feb 9, 2019
  5. modified the milestones: v1.47, v1.48 on Apr 15, 2019
  6. modified the milestones: v1.48, v1.49 on Jun 19, 2019
  7. modified the milestones: v1.49, v1.50 on Aug 27, 2019
  8. modified the milestones: v1.50, Known Problem on Nov 14, 2019
  9. 14 remaining items

  10. modified the milestones: Known Problem, v1.55 on Feb 12, 2021
  11. ivandeex commented on Feb 12, 2021

    @ivandeex
    Member

    Sorry, my bad. I should have looked in the docs. Now I can see it explicitly documented in https://rclone.org/commands/rclone_copy/

    Note that it is always the contents of the directory that is synced, not the directory so when source:path is a directory, it's the contents of source:path that are copied, not the directory name and contents

    So that's expected.

    I admit, this behavior deviates from traditional cp. Unlike cp, rclone grew as a cloud-first tool where directories are frequently are only a part of file name, not a real container.

    We will not change that for compatibility with a wealth of rclone wrappers out there. Instead, we will add a new rclone cp command (see #4777) with more traditional semantics.

    I think this request too can be merged into #4777

    cc @ncw

  12. modified the milestones: v1.55, Soon on Feb 12, 2021
  13. ncw commented on Feb 12, 2021

    @ncw
    Member

    I think this request too can be merged into #4777

    Yes, I'd agree.

  14. removed this from the Soon milestone on Feb 12, 2021
  15. ivandeex commented on Feb 12, 2021

    @ivandeex
    Member

    Merged into #4777 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions