Archive folders don't appear nested

Description

Regular folders are nested:
image

Folders under “archive” (eg. archived using Thunderbird) are not:
image

To Reproduce…

Steps to reproduce the behavior:

  1. Create Archive/foo folder
  2. Look in sidebar in Mailspring

Expected Behavior

Folders should be nested under “Archive”

Screenshots

As above

Setup

  • OS and Version: Windows 10, 20H2
    • Installation Method: Windows installer
  • Mailspring Version: 1.8.0

Additional Context

N/A

I’ve notice this problem, I think that folders only appear nested if the top-folder (in this case “Archive”) exists. I’m not sure which behaviour would be more reasonable if the top level does not exist.

The top-level folder exists, and I see them properly nested in other email clients, for example Roundcube webmail:
image

And the “scanning messages” thing in Mailspring does show a top-level “Archive” folder:
image

I think Mailspring may be special-casing “Archive” as it appears in the list at the top rather than in the “Folders” list.

Some additional info: Nested folders under the first subfolders do appear nested:

image

It’s just the top-level Archive/2007 that doesn’t nest properly.