summaryrefslogtreecommitdiffstats
path: root/imap
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 /imap
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 'imap')
-rw-r--r--imap/imap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/imap/imap.c b/imap/imap.c
index 009c222c..f5066b25 100644
--- a/imap/imap.c
+++ b/imap/imap.c
@@ -588,7 +588,9 @@ static int imap_open_mailbox (CONTEXT* ctx)
imap_qualify_path (buf, sizeof (buf), &mx, idata->mailbox);
FREE (&(ctx->path));
+ FREE (&(ctx->realpath));
ctx->path = safe_strdup (buf);
+ ctx->realpath = safe_strdup (ctx->path);
idata->ctx = ctx;