Thierry Volpiatto <thierry.volpia...@gmail.com> writes: > Hi, > it seem that `ange-ftp-get-files' always check the content of his cache > in hashtable and doesn't update it after first listing. > Removing the gethash check to `ange-ftp-files-hashtable' fix it. > > So I don't understand how this hashtable could be updated when new files > are copied/removed from the ftp server. > IMO this code is wrong.
Here is described the problem: --8<---------------cut here---------------start------------->8--- ange-ftp-reread-directory Reread remote directory DIR to update the directory cache. The implementation of remote FTP file names caches directory contents for speed. Therefore, when new remote files are created, Emacs may not know they exist. You can use this command to reread a specific directory, so that Emacs will know its current contents. --8<---------------cut here---------------end--------------->8--- So actually when some files have been copied or removed, one should reread the ftp directory to update cache. This should been done automatically isn't it? I have fixed this in helm by doing this before listing a directory: --8<---------------cut here---------------start------------->8--- ;; Always reread ftp directory, otherwise we will never be aware ;; of new or deleted files. (when (eq 'ftp (file-remote-p directory 'method)) (setq ange-ftp-ls-cache-file nil) (remhash directory ange-ftp-files-hashtable)) --8<---------------cut here---------------end--------------->8--- -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 _______________________________________________ Tramp-devel mailing list Tramp-devel@gnu.org https://lists.gnu.org/mailman/listinfo/tramp-devel