useless options, cluttering the codebase that can be emulated if needed in fcc-hooks.
[apps/madmutt.git] / hook.c
diff --git a/hook.c b/hook.c
index 0e6a689..a71724c 100644 (file)
--- a/hook.c
+++ b/hook.c
@@ -356,23 +356,10 @@ void mutt_default_save (char *path, ssize_t pathlen, HEADER * hdr)
 
 void mutt_select_fcc (char *path, ssize_t pathlen, HEADER * hdr)
 {
-  address_t *adr;
-  char buf[_POSIX_PATH_MAX];
-  ENVELOPE *env = hdr->env;
-
-  if (mutt_addr_hook (path, pathlen, M_FCCHOOK, NULL, hdr) != 0) {
-    if ((option (OPTSAVENAME) || option (OPTFORCENAME)) &&
-        (env->to || env->cc || env->bcc)) {
-      adr = env->to ? env->to : (env->cc ? env->cc : env->bcc);
-      mutt_safe_path (buf, sizeof (buf), adr);
-      mutt_concat_path(path, pathlen, NONULL(Maildir), buf);
-      if (!option (OPTFORCENAME) && mx_access (path, W_OK) != 0)
+    if (mutt_addr_hook (path, pathlen, M_FCCHOOK, NULL, hdr) != 0) {
         m_strcpy(path, pathlen, NONULL(MAlias.record));
     }
-    else
-      m_strcpy(path, pathlen, NONULL(MAlias.record));
-  }
-  mutt_pretty_mailbox (path);
+    mutt_pretty_mailbox (path);
 }
 
 static const char *_mutt_string_hook (const char *match, int hook)