Show error "File not found" on "Preset text" only if text is a file

SVN revision: 2447
This commit is contained in:
Stefan Ritt 2012-04-10 08:07:34 +00:00
parent 5930d90292
commit 722d8ce55e

View File

@ -11132,9 +11132,16 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
strsubst_list(str, sizeof(str), slist, svalue, j);
while (strstr(str, "\\n"))
memcpy(strstr(str, "\\n"), "\r\n", 2);
rsputs("File <i>");
rsputs3(str);
rsputs("</i> cannot be found");
if (strchr(str, ' ')) {
/* name contains blanks -> must be text */
rsputs3(str);
} else {
/* name is probably a file -> show error */
rsputs("File <i>");
rsputs3(str);
rsputs("</i> cannot be found");
}
}
}