--rmdirs not honored with 1fichier + version 1.56

What is the problem you are having with rclone?

rclone delete --min-age 56d --rmdirs 1fichier:/ is not honored, the empty directories are not deleted

What is your rclone version (output from rclone version)

1.56

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

CentOS 7

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

1fichier

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

rclone delete --min-age 56d --rmdirs 1fichier:/

=> downgrading to version 1.54.1 made it work, so obviously a bug sneeked in!

I did a very quick test

$ echo hello | rclone rcat TestFichier:testdir/subdir/file
rclone tree TestFichier:testdir

$ rclone tree TestFichier:testdir
/
└── subdir
    └── file

1 directories, 1 files

$ rclone delete -vv --max-age 1d --rmdirs TestFichier:testdir
2021/08/15 15:29:29 DEBUG : --max-age 1d to 2021-08-14 15:29:29.742030198 +0100 BST m=-86399.972778843
2021/08/15 15:29:29 DEBUG : rclone: Version "v1.57.0-beta.5629.38c854f4b.fix-5491-dropbox-batch" starting with parameters ["rclone" "delete" "-vv" "--max-age" "1d" "--rmdirs" "TestFichier:testdir"]
2021/08/15 15:29:29 DEBUG : Creating backend with remote "TestFichier:testdir"
2021/08/15 15:29:29 DEBUG : Using config file from "/home/ncw/.rclone.conf"
2021/08/15 15:29:31 DEBUG : Waiting for deletions to finish
2021/08/15 15:29:34 INFO  : file: Deleted
2021/08/15 15:29:36 INFO  : subdir: Removing directory
2021/08/15 15:29:37 DEBUG : 3 go routines active
$ rclone tree TestFichier:testdir
/

0 directories, 0 files
$ 

And this was successful...

Can you run the command again with -vv and post the log please?

I think that --min-age 56d argument applies to directories, and it should not:

[root@cluster1 ~]# rclone delete -vv --min-age 56d --rmdirs 1fichier:/test
2021/09/10 04:45:05 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2021/09/10 04:45:05 DEBUG : --min-age 1.8666666666666667M to 2021-07-16 04:45:05.22779916 -0400 EDT m=-4838399.946247425
2021/09/10 04:45:05 DEBUG : rclone: Version "v1.55.1" starting with parameters ["rclone" "delete" "-vv" "--min-age" "56d" "--rmdirs" "1fichier:/test"]
2021/09/10 04:45:05 DEBUG : Creating backend with remote "1fichier:/test"
2021/09/10 04:45:05 DEBUG : fs cache: renaming cache item "1fichier:/test" to be canonical "1fichier:test"
2021/09/10 04:45:05 DEBUG : Waiting for deletions to finish
2021/09/10 04:45:06 DEBUG : fs cache: switching user supplied name "1fichier:/test" for canonical name "1fichier:test"
2021/09/10 04:45:08 DEBUG : 4 go routines active
[root@cluster1 ~]# rclone delete -vv --rmdirs 1fichier:/test
2021/09/10 04:49:05 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2021/09/10 04:49:05 DEBUG : rclone: Version "v1.55.1" starting with parameters ["rclone" "delete" "-vv" "--rmdirs" "1fichier:/test"]
2021/09/10 04:49:05 DEBUG : Creating backend with remote "1fichier:/test"
2021/09/10 04:49:06 DEBUG : fs cache: renaming cache item "1fichier:/test" to be canonical "1fichier:test"
2021/09/10 04:49:06 DEBUG : Waiting for deletions to finish
2021/09/10 04:49:07 DEBUG : fs cache: switching user supplied name "1fichier:/test" for canonical name "1fichier:test"
2021/09/10 04:49:09 DEBUG : test: Removing directory
2021/09/10 04:49:09 DEBUG : 4 go routines active

As you can see: version 1.55.1 is also affected.

According to docs 1fichier does not support mod-time so --max-age is not applicable

https://rclone.org/overview/#features

It does work for files: I have been using it constantly~. This bug relates to the --rmdirs argument, which was working in version 1.54 when used with the --max-age argument.

I have to run 2 commands instead of one. I do not know if the --rmdirs argument shall apply with an AND condition with the --max-age argument?
Maybe it's working as expected and it's me not understanding the logic of the arguments: are they standalone?

I think probably what is happening is that any directory which are empty but don't have a file older than 54 days aren't being considered for deletion.

You might want to run through with rclone rmdirs to delete all the empty directories then try again - I think it will work properly after that - if deleting an 56d old file causes a directory to become empty then it will be deleted.

Does that make sense?

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