fixup! org-id-update-id-locations: Optimize performance

Avoid modifying FILES by side effect.
This commit is contained in:
Ihor Radchenko 2023-08-04 10:54:16 +03:00
parent 11ce194dcf
commit 47b04383e7
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 1 additions and 1 deletions

View File

@ -511,7 +511,7 @@ If SILENT is non-nil, messages are suppressed."
(lambda (f)
(when (file-exists-p f)
(list f (file-attribute-modification-time (file-attributes f)))))
(sort files #'string<))))
(sort (copy-sequence files) #'string<))))
(unless (equal checksum org-id--locations-checksum) ; Files have changed since the last update.
(setq org-id-locations nil)
(with-temp-buffer