Suppose I have a message with multiple MIME attachments. If I enter "K a" in either the folder or show buffer, I get this prompt:
Store in directory: ~/
If I then press TAB, I get a completion for $HOME. So far so good.
Suppose I save the attachments to "~/Desktop/".
The next time I do "K a", the prompt looks like
Store in directory (default ~/Desktop/): ~
And that doesn't actually work as advertised. For example, if I press RET, the attachments are not saved to Desktop. Instead, I get a completion list of what looks like the home directory for various users.
Fixed in Emacs 29.1 (2181495af8).