STOP and READUSE THIS TEMPLATENO EXCEPTIONS - By not using this, you waste your time, our time and really hate puppies. Please remove these two lines and that will confirm you have read them.
What is the problem you are having with rclone?
Empty directories reappear after deletion. This is using rclone mount in the Windows Explorer GUI. I believe the folder is not getting deleted from the syncing directory on the computer and then after 1 minute is getting reuploaded to the cloud drive. This is a previous issue from a few years back, but was fixed. I first noticed the problem reappeared a few weeks ago.
Run the command 'rclone version' and share the full output of the command.
rclone v1.66.0
os/version: Microsoft Windows 10 Home 22H2 (64 bit)
os/kernel: 10.0.19045.4412 (x86_64)
os/type: windows
os/arch: amd64
go/version: go1.22.1
go/linking: static
go/tags: cmount
Which cloud storage system are you using? (eg Google Drive)
iDrive e2
The command you were trying to run (eg rclone copy /tmp remote:tmp)
mount e2drive:e2drive/ T: --vfs-cache-mode writes --file-perms 0777
Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.
A log from the command that you were trying to run with the -vv flag
N/A
I don't think it is applicable. I wasn't attempting to run a command. The posted command was running in the background, but as stated, I was using the Windows Explorer GUI to delete a directory from my mounted S3 drive. A minute later, the empty directory reappears. This has happened to any empty directory I have tried to delete over the past few weeks.
I did not recently update from 1.56.2 I am using rclone 1.66 as detailed in the post. I did recently upgrade from 1.65.2, but the problem seems to happen with both versions.
I don't plan to install 1.56.2 as it's almost 2 years old, with many updates since then. Is there a reason you want me to downgrade to that specific build?
i see that you started a topic about this same issue, and that i contributed to that same topic.
so i am not seeing a difference from your current topic and this old topic? https://forum.rclone.org/t/empty-directories-remain/26228
i think that is correct. it may appear that rclone mount has deleted the dir but it will re-appear after --dir-cache-time expires.
rclone cannot delete an empty dir.
rclone cannot create an empty dir without --s3-directory-markers
There isn't much of a difference I'm guessing between the old post and new regarding what's going on behind the scenes. The previous post, 3 years ago, dealt with a direct command - rmdirs and this deals with deleting from a GUI using rclone mount.
The crux is that I've been using the same mounting command daily for at least a year in a startup script on my computer. The issue with directories reappearing after deleting had been fixed not too long after I posted 3 years ago. So, there was an issue three years ago. It stopped being an issue, and it has recently reappeared. Besides updating rclone, I have made no changes to the mounting command I use for a year or two.
This morning I ran the mounting command to output to a logfile. In 7 minutes, the file has almost 500,000 lines. I attempted to delete a folder called "1997" twice. It continued to reappear, I'm assuming you are correct, it's reappearing after the --dir-cache-time expires. Why would this occur though? If when deleting files, rclone deletes from both the s3 storage and cache, why wouldn't rclone delete folders from the local cache as well?
I appreciate the help three years ago. I understood what was happening then, and it appears the same thing is happening now. However, I did not understand both then and now, why this is a problem rclone could not deal with. When a file is deleted using mount, I'm assuming that file is removed from both the cloud and the local cache on the computer. I assume this because deleted files aren't reappearing. However, when I attempt to delete a directory, sometimes even a directory with files in it, an empty directory reappears. When I check my local cache, the folder is not getting deleted from the local computer. What is the hurdle that is preventing rclone from deleting folders from the local cache when they are deleted from the cloud using mount?
This issue seems to have been solved a few years ago after my post. However, now that the issue has reappeared, and I am attempting to alert the programmers to that fact.
Maybe rclone mount could be a bit more clever with remotes where empty directories are not supported by default... but in case of S3 (where a concept of directory does not exist) there is simple solution available - --s3-directory-markers flag. It should make all behave similarly to "any other" filesystem where directories are supported.
Probably the easiest is to add it to remote's config: