- /* Something went wrong. Output might be expected, such as if this were run
- as a filter. Just copy the input to the output. */
- const char *input_filename = path (msgnam, TFILE);
+ /* Something went wrong. Output might be expected,
+ such as if this were run as a filter. Just copy
+ the input to the output. */
+ /* Can't use path() here because 1) it might have been
+ called before and it caches the pwd, and 2) we call
+ chdir() after that. */
+ char *input_filename =
+ concat (maildir, "/", msgnam, NULL);