Skip to content

[Bug]: Folders and Files are not stored correctly #379

@Bananas-Are-Yellow

Description

@Bananas-Are-Yellow

Description

The JMAP File Storage spec describes directory nodes and file nodes, but Bulwark Files does not use them in the intended way. Instead of a hierarchy of folders, containing files, Bulwark creates a flat list of files for everything. The files have names equal to their path, containing '/' characters.

For example, here is a folder and file hierachy. You can create this in the Bullwark Files UI.

- Stuff
  - Nonsense
      - Notes.md
      - Other.md

But when you access this with JMAP, you get a flat list of FileNodes, all at the top level (that is, parentId = null), like this:

File: "Stuff"
File: "Stuff/Nonsense"
File: "Stuff/Nonsense/Notes.md"
File: "Stuff/Nonsense/Other.md"

Even the folders are represented as files. They even have a non-null blobId.

I am writing a client app that accesses the folders and files using JMAP, and this is very confusing. Stalwart provides a WebDAV server, and if I create a hierarchy using that, when I access it using JMAP, it is still a hierarchy, as I would expect. But not so with Bulwark.

Steps to Reproduce

See description.

Expected Behavior

See description.

Actual Behavior

See description.

Bulwark Version

1.7.2

Stalwart Mail Server Version

0.15.5

Browser

Chrome / Chromium

Operating System

Linux

Screenshots / Screen Recording

No response

Relevant Logs or Error Output

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions