summaryrefslogtreecommitdiffstats
path: root/pop.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2016-06-23 12:38:07 -0700
committerKevin McCarthy <kevin@8t8.us>2016-06-23 12:38:07 -0700
commit149eb79ea2fc4cecb60fa8ee8d65f905a13aee9e (patch)
treed599388a2c5eb336a3a0843cb99df47ee7559379 /pop.c
parent9ba2d8a79270ee621de2bdcedce4757eab73fe54 (diff)
Change sidebar to consistently use realpath for context and buffy comparison.
The original sidebar patch contained a half-implemented attempt to use realpath() mailbox paths for comparison. (Presumably so the open mailbox remains highlighted despite symlink issues). Add realpath to the Context, and set it when opening a mailbox. Remove sidebar ifdef for the buffy member, and always set it there too. Change the sidebar to use the realpath for comparison everywhere. mutt_buffy_check() is using stat device and inode for comparison. Perhaps this can be changed to use realpath instead, but that's beyond the scope of this patch.
Diffstat (limited to 'pop.c')
-rw-r--r--pop.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pop.c b/pop.c
index 9e0a1459..972b7152 100644
--- a/pop.c
+++ b/pop.c
@@ -421,7 +421,9 @@ static int pop_open_mailbox (CONTEXT *ctx)
return -1;
FREE (&ctx->path);
+ FREE (&ctx->realpath);
ctx->path = safe_strdup (buf);
+ ctx->realpath = safe_strdup (ctx->path);
pop_data = safe_calloc (1, sizeof (POP_DATA));
pop_data->conn = conn;