[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ange-ftp-get-files is not updating his cache

From: Michael Albinus
Subject: Re: ange-ftp-get-files is not updating his cache
Date: Tue, 10 Jul 2012 10:27:39 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

Thierry Volpiatto <address@hidden> writes:

>> Hi,

Hi Thierry,

[first of all: ange-ftp is not part of Tramp. An Emacs mailing list, or
filing an Emacs bug, might be more appropriate. But so what ...]

>> 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 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?

Yes. This not implemented in ange-ftp.

> 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---

That's a sledge-hammer approach :-)

I will see, whether I could improve ange-ftp for this. Unfortunately,
there are several places one needs to invalidate the cache.

Best regards, Michael.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]