Skip to content

Incremental export creates Unknown Folder for notes it cannot resolve; full export handles these correctly #36

Description

@anthonyjclarke

Description

A full export correctly places all notes — including epoch-dated ones with no folder metadata — into the standard account folder (e.g. iCloud/Notes/). However, an incremental export creates a directory named literally Unknown Folder for any notes it cannot resolve to a named folder:

iCloud/
  Notes/
    Holiday plans.html
    ...                    ← epoch-dated notes land here on full export
  Unknown Folder/          ← created only by incremental export
    2001-01-01.html
    2001-01-01 (2).html
    ...
    2001-01-01 (8).html

Steps to reproduce

Run a full export — all notes appear in iCloud/Notes/, no Unknown Folder created
Without changing anything in Apple Notes, point a fresh export folder at the same notes and run with --incremental
A small number of notes (in this case 8) appear in iCloud/Unknown Folder/ instead of iCloud/Notes/

What these notes have in common

Filename is 2001-01-01 — the Apple Cocoa epoch date, indicating no valid date is recorded in Apple Notes' database
Exported HTML contains no meaningful body text
The full exporter resolves these to iCloud/Notes/ without issue; the incremental exporter does not

Impact

The full and incremental exporters produce different folder structures for the same set of notes — third-party tools built on the export structure encounter an unexpected directory that only appears after incremental runs
The notes sort to the bottom of any date-sorted view as an anonymous cluster under an unfamiliar folder name

Reference

Discovered while building apple-notes-viewer, a local viewer for apple-notes-exporter output.
Happy to provide further diagnostic output if useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions