Rmdirs -v doesn't show anything (-vv works as expected)

Whether the lack of expected and consistent behavior is a bug or if this is a feature request is debatable. But still...

What is the problem you are having with rclone?

rmdirs -v shows no additional information. (note that -vv works as expected)

What is your rclone version (output from rclone version)

rclone v1.55.1
- os/type: darwin
- os/arch: amd64
- go/version: go1.16.3
- go/linking: dynamic
- go/tags: cmount

Which OS you are using and how many bits (eg Windows 7, 64 bit)

macOS 64bit

Which cloud storage system are you using? (eg Google Drive)

Local for now. Eventually any of them that support empty directoires

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

rclone mkdir testdir/deeper # just setup
rclone -v rmdirs testdir

or

rclone mkdir onedrive:tmp/deep/deeper
rclone -v rmdirs onedrive:tmp/deep

On both, the issue is there is no output.

In general, I expect -v to be what is done and -vv is what is not done as well. But -v doesn't show what is being deleted. Only -vv (which also shows everything else)

The rclone config contents with secrets removed.

N/A for local

[onedrive]
type = onedrive
token = {"access_token":"REDACTED","expiry":"2021-07-19T10:31:53.29718-06:00"}
drive_id = REDACTED
drive_type = personal
client_id = REDACTED
client_secret = REDACTED

A log from the command with the -vv flag

Well, this is really N/A since there isn't a bug in -vv but just so that we don't go around and around...

2021/07/19 09:34:09 DEBUG : Using config file from "/Users/<ME>/.config/rclone/rclone.conf"
2021/07/19 09:34:09 DEBUG : rclone: Version "v1.55.1" starting with parameters ["rclone" "-vv" "rmdirs" "onedrive:tmp/deep"]
2021/07/19 09:34:09 DEBUG : Creating backend with remote "onedrive:tmp/deep"
2021/07/19 09:34:11 DEBUG : deeper: Removing directory
2021/07/19 09:34:13 DEBUG : One drive root 'tmp/deep': Removing directory
2021/07/19 09:34:13 DEBUG : 7 go routines active

Oh, here is the really interesting thing: --dry-run does show what will happen (regardless of -v)

I think this is a bug!

It is probably very easy to fix though.

Can you open a new issue on Github. Maybe you could propose a fix?

Done #5464

Harder ask but I spent some time jumping through the code (I don't know golang) and I think I may have found the issue. From the comments on github:

My best guess is that at fs/operations/operations.go#L104 should be Infof (if I am understanding things from fs/log.go correctly)

That fix looks good to me :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.