|
From: | Jürgen Hötzel |
Subject: | Re: tramp-cache and destructive operations |
Date: | Thu, 13 Aug 2015 08:56:32 +0200 |
tramp-cache does not care about the object you cache. Often, it is not a
list but a simple value, like a string.
If you cache a list, the hash keeps just the entry to that list. If you
use that list, and it is modified somewhere else, it is not the duty of
tramp-cache to prevent this.
So yes, using `copy-sequence' in
`tramp-adb-handle-directory-files-and-attributes' seems to be TRT.
Another approach could be to change the implementation and to cache
another list, which is used then to assemble the result of
`tramp-adb-handle-directory-files-and-attributes'. See the cache entries
when evalling `tramp-handle-directory-files-and-attributes', which uses
the cache entry for "file-name-all-completions", IIRC.
> Thanks,
>
> Jürgen
Best regards, Michael.
[Prev in Thread] | Current Thread | [Next in Thread] |