FTP copies cached file list instead of all files

I'm finding that when I copy a folder from an FTP site, DO is copying the files it "thinks" is in each folder, not the files that actually "are" in each folder.

For example:[ol]
[li]You view the contents of the FTP folder /root/folder/images/ and see 5 files.[/li]
[li]Someone else with access to the FTP site uploads more files into /root/folder/images/ so we now have 10 files.[/li]
[li]Without refreshing I go up to /root/ and copy folder/ to my PC.[/li]
[li]Only the 5 files in /root/folder/images/ I viewed in step 1 copy across instead of the 10 that are actually in that location after step 2.[/li][/ol]If DO has cached the file list in a sub-folder of the folder I'm copying I would expect it to ignore that information and re-query the list. Instead I'm finding myself going through each folder and manually refreshing their contents so I can ensure I get all the files.

I don't see an option to control this behaviour.

This is a rare case where the contents of an FTP site changes dynamically. For efficiency, Opus caches FTP directories. So if you have read the folder then it will be cached and not re-read since there's no such thing as file notification on an FTP site. You can manually refresh the cache by refreshing the folder (F5) if you suspect there's been a change. Or you can turn off caching from Miscellaneous - Advanced and set ftp_do_not_cache to true.

Thanks for the suggestion about turning off caching.

I don't have a problem with caching for the purpose of quickly displaying files/folders in a lister. But when copying a folder of folders/files it's highly undesirable to not get all the content currently on the server.

Is there a way to manually refresh/delete the cache for all sub-folders before I copy them, rather than turning off caching? Turning off caching would be unbearable, but having to trawl through every folder and refresh their contents before doing a copy is just as bad.

No. Cache is either on or off.

If someone is changing the site while you are looking at it then what's to stop them changing it between the start of the copy operation (when it works out what's on the site and needs copying) and the end? Seems like a situation where you cannot win.

If you've been connected to the site for a long time then I can see it being a problem. In that situation, when it's likely someone else has changed what's on the site, it's probably worth disconnecting and reconnecting. (AFAIK Opus doesn't cache folders between FTP sessions.)

Yeah, but that's true copying files from any public location including file servers.

That's right. I may not close the DO window with the FTP connection for over 24 hours--maybe even days. In my situation I'm making changes to file during the day whilst a colleague is making changes at night.

Ah, well if simply disconnecting and reconnecting will clear the cache then that would satisfy me.

Having said that, I still don't think it's wise to perform file operations with the information in the cache, and so I've gone to the trouble now to use Filezilla instead. DO doesn't give me the confidence I need when working with important files. For my own personal use DO's behaviour wouldn't bother me.

Heavens above. This is getting quite silly! (Not you personally, just the discussion! :wink:

Just turn off the cache.