diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 1999-01-12 22:01:11 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 1999-01-12 22:01:11 +0000 |
commit | a983c11963da7df7c9e4a99e54084a2cf4a1b176 (patch) | |
tree | a5142d07798d7d4586e566b600ee75c6d76f33d1 /mbox.c | |
parent | 66ff19a6624f6947f057555d372af1166b66872c (diff) |
Open folders in read-only mode if mutt can't lock them.
Diffstat (limited to 'mbox.c')
-rw-r--r-- | mbox.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -53,13 +53,14 @@ int mbox_lock_mailbox (CONTEXT *ctx, int excl, int retry) { int r; - /* XXX - Currently, we force dotlocking. - * Use dotlock -t here. - */ - if ((r = mx_lock_file (ctx->path, fileno (ctx->fp), excl, 1, retry)) == 0) ctx->locked = 1; - + else if (retry && !excl) + { + ctx->readonly = 1; + return 0; + } + return (r); } @@ -575,7 +576,7 @@ int mbox_check_mailbox (CONTEXT *ctx, int *index_hint) /* we couldn't lock the mailbox, but nothing serious happened: * probably the new mail arrived: no reason to wait till we can * parse it: we'll get it on the next pass - * */ + */ return (M_LOCKED); } unlock = 1; |