Here's a part of the KMail's IMAP log:
C: A000003 SELECT "Projects/test folder with space" (CONDSTORE)
S: * 0 EXISTS
S: * 0 RECENT
S: * OK UIDs valid [ UIDVALIDITY 1 ]
S: * OK Predicted next UID [ UIDNEXT 1 ]
S: * OK [ HIGHESTMODSEQ 1000000000000000000 ]
S: * FLAGS ( \Answered \Flagged \Deleted \Seen \Draft \* )
S: * OK Permanent flags [ PERMANENTFLAGS ( \* \Answered \Flagged \Deleted \Seen \Draft ) ]
S: A000003 OK SELECT completed [ READ-WRITE ]
C: A000004 MYRIGHTS "Projects/test folder with space"
S: * MYRIGHTS Projects/test folder with space lrswikxtea
S: A000004 OK Success
The problem seems to be that the MYRIGHT answer from the server doesn't quote the identifier.
Log from Thunderbird which also throws a parser error, but probably applies a workaround internally:
S-Projects/test folder with space:SendData: 10 myrights "Projects/test folder with space"
D/IMAP ReadNextLine [stream=0x7fca4eadd450 nb=55 needmore=0]
S-Projects/test folder with space:CreateNewLineFromSocket: * MYRIGHTS Projects/test folder with space lrswikxtea
S-Projects/test folder with space:PARSER:Internal Syntax Error on line: %s: * MYRIGHTS Projects/test folder with space lrswikxtea
Would be nice if someone could look into that.