endless loop in _maildir_commit_message when using filesystems with broken hardlinks implementation
mutt will endlessly loop when comitting a message to a mailbox whenever safe_rename returns EEXIST. This causes the receiving mailbox to be flooded and mutt to hang until forcibly killed and happens in case of broken filesystem implementations that don't handle hardlinks well, e.g. sshfs
sshfs will create a hardlink with a different inode number than the file that points to it, safe_rename returns EEXIST when compare_stat() fails
mh.c:1576 -> there should be a maximum loop count in the FOREVER,
lib.c:523 safe_rename shouldn't errno=EEXIST if compare_stat fails,
or there should be an else case to handle the errno=EEXIST case
my proposition would be to modify lib.c:520, so that safe_rename() unlink(target) if the compare_stat fails and return a suitable errno (maybe ENOSYS?) - see included patch for mutt-1.10
I haven't tested this patch so it may have side-effects
safe_rename patch: safe_rename.patch
debug: muttdebug