Hey, Predrag.

i wrote:
 |Predrag Punosevac <[email protected]> wrote:
 ||I just upgraded to s-nail version v14.8.11 which I am running of OpenBSD

 ||6.0 stable. I notice that I no longer move messages to different folders

 ||I am way to tired even to look at this tonight. I will have to go back
 ||to 14.8.10 which was working for me.
 |
 |Excuse me please.
 |Would you be so kind and do
 |
 |  $ git clone --single-branch --branch='stable/latest' \
 |      https://git.sdaoden.eu/scm/s-nail.git
 |  $ cd s-nail && git checkout stable/latest && make all

Nonsense!  As an OpenBSD user, please find attached a 1673 bytes
patch against v14.8.11.

 |and call back to verify it is working all-right for you now, too?

That would be very kind!

 |I will release v14.8.12 immediately, then.

Thanks and Ciao!

--steffen
commit 111f80a
Author:     Steffen (Daode) Nurpmeso <[email protected]>
AuthorDate: 2016-10-04 16:04:32 +0200
Commit:     Steffen (Daode) Nurpmeso <[email protected]>
CommitDate: 2016-10-04 16:04:32 +0200

    FixFix IMAP "+" expansion and more (Predrag Punosevac)
---
 fio.c  | 15 ++++++++++-----
 imap.c |  2 +-
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/fio.c b/fio.c
index c4b82b5..4471355 100644
--- a/fio.c
+++ b/fio.c
@@ -1328,13 +1328,18 @@ jnext:
 
    if (res[0] == '+' && getfold(cbuf, sizeof cbuf)) {
       size_t i;
+      bool_t soll;
 
       i = strlen(cbuf);
-      if(which_protocol(cbuf) != PROTO_IMAP)
-         res = str_concat_csvl(&s, cbuf,
-               ((i > 0 && cbuf[i - 1] == '/') ? "" : "/"), res + 1, NULL)->s;
-      else
-         res = savestrbuf(cbuf, i);
+      soll = (i > 0 && cbuf[i - 1] == '/');
+      if(which_protocol(cbuf) == PROTO_IMAP){
+         bool_t hpath;
+
+         hpath = (strcmp(cbuf, protbase(cbuf)) != 0);
+         res = str_concat_csvl(&s, cbuf, (hpath || soll ? "" : "/"),
+               &res[1], NULL)->s;
+      }else
+         res = str_concat_csvl(&s, cbuf, (soll ? "" : "/"), &res[1], NULL)->s;
       dyn = TRU1;
 
       if (res[0] == '%' && res[1] == ':') {
diff --git a/imap.c b/imap.c
index 9eb6101..9329bb5 100644
--- a/imap.c
+++ b/imap.c
@@ -2760,7 +2760,7 @@ imap_copy1(struct mailbox *mp, struct message *m, int n, const char *name)
       size_t i;
 
       i = strlen(name = imap_fileof(name));
-      if(i > 0 && name[i - 1] == '/')
+      if(i == 0 || (i > 0 && name[i - 1] == '/'))
          name = savecat(name, "INBOX");
       qname = imap_quotestr(name);
    }
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
__________________________________
[email protected]

Reply via email to