Subject: bug#61394: 30.0.50; [PATCH] Image-dired thumb name based on content

From: Basil Contovounesios <[email-masked]>
Date: Fri, 10 Feb 2023 15:13:27 +0000

Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" [2023-02-09 20:06 +0100] wrote:

> +(defun image-dired-content-sha1 (filename)
> +  "Compute the SHA-1 of a part of FILENAME."
> +  (with-temp-buffer
> +    (let ((file-size (file-attribute-size (file-attributes filename)))
> +	  (chunk-size 4096))
> +      (insert-file-contents filename nil 0 (min chunk-size file-size))

Can't we unconditionally pass END=chunk-size to insert-file-contents,
even for smaller files?

Thanks,

-- 
Basil