Jürgen Hötzel <[email protected]> writes: > Hi,
Hi Juergen, > As a workaround I use `copy-sequence' in > `tramp-adb-handle-directory-files-and-attributes'. > But this is not a generic solution. Should tramp-cache be modified to > always return a copy of lists? 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. _______________________________________________ Tramp-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/tramp-devel
