summaryrefslogtreecommitdiff
path: root/pith/conf.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2016-07-13 12:11:24 -0600
committerEduardo Chappa <chappa@washington.edu>2016-07-13 12:11:24 -0600
commited5e72568b40db990bc375aa86f94c35cc8c05cc (patch)
treef3815f6e74e1604dc9f060a76957ccbc1875dff7 /pith/conf.c
parentfa94ee5653f053d6dfbe1fcad056d5262dbb6e2b (diff)
downloadalpine-ed5e72568b40db990bc375aa86f94c35cc8c05cc.tar.xz
* Bug: when moving to use realpath to resolve symbolic links, .pinerc
file would not be created if it did not exist.
Diffstat (limited to 'pith/conf.c')
-rw-r--r--pith/conf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pith/conf.c b/pith/conf.c
index 79243222..9868013e 100644
--- a/pith/conf.c
+++ b/pith/conf.c
@@ -5962,6 +5962,10 @@ write_pinerc(struct pine *ps, EditWhich which, int flags)
#ifndef _WINDOWS
if ((realfilename = realpath(filename, NULL)) != NULL)
realfilename_malloced = 1;
+ else if(our_stat(filename, &sbuf) < 0 && errno == ENOENT){
+ realfilename = filename;
+ realfilename_malloced = 0;
+ }
else
goto io_err;
#else