From 102679e27468bf6f8e1da24ccb9b0d93c489ec7e Mon Sep 17 00:00:00 2001 From: Jon Steinhart Date: Tue, 16 Nov 2004 18:08:07 +0000 Subject: [PATCH] Fixed typo in comment. Fixed problem with refile hook when refiling across filesystems. --- sbr/folder_addmsg.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sbr/folder_addmsg.c b/sbr/folder_addmsg.c index f03d386..401896a 100644 --- a/sbr/folder_addmsg.c +++ b/sbr/folder_addmsg.c @@ -137,7 +137,7 @@ folder_addmsg (struct msgs **mpp, char *msgfile, int selected, * Then run the external hook on the message if one was specified in the context. * Run the refile hook if we're moving the message from one place to another. * We have to construct the from path name for this because it's not there. - * Run the add hook if the message is getting copied or lined somewhere else. + * Run the add hook if the message is getting copied or linked somewhere else. */ if (link (msgfile, newmsg) != -1) { @@ -197,8 +197,10 @@ folder_addmsg (struct msgs **mpp, char *msgfile, int selected, close (infd); close (outfd); - if (deleting) - (void)ext_hook("ref-hook", newmsg, msgfile); + if (deleting) { + (void)snprintf(oldmsg, sizeof (oldmsg), "%s/%s", pwd(), msgfile); + (void)ext_hook("ref-hook", oldmsg, newmsg); + } else (void)ext_hook("add-hook", newmsg, (char *)0); -- 1.7.10.4