- if (*isdf == -1 || folder == NULL || *folder == '\0') {
- if (*isdf == -1 || (cp = context_find ("Draft-Folder")) == NULL) {
- *isdf = 0;
- return m_maildir (msg && *msg ? msg : draft);
- } else {
- folder = path (*cp == '+' || *cp == '@' ? cp + 1 : cp,
- *cp != '@' ? TFOLDER : TSUBCWF);
- }
- }
- *isdf = 1;
-
- chdir (m_maildir (""));
- strncpy (buffer, m_maildir (folder), sizeof(buffer));
- if (stat (buffer, &st) == -1) {
- if (errno != ENOENT)
- adios (buffer, "error on folder");
- cp = concat ("Create folder \"", buffer, "\"? ", NULL);
- if (!getanswer (cp))
- done (0);
- free (cp);
- if (!makedir (buffer))
- adios (NULL, "unable to create folder %s", buffer);
- }