Skip to content

fix(base): virtual folder entries report a 1970 upload timestamp #253

Open

Description

@ffumero2003

Problem

b2_list_file_names and b2_list_file_versions with a delimiter return virtual folder entries (action: "folder"). The B2 docs say their uploadTimestamp is 0. blazer converts it with millitime(0) (base/base.go), so the listing's base.File and FileInfo for a folder carry an upload time of 1970-01-01T00:00:00Z instead of "no time". This is the same pattern as #244 (key expirations).

Impact

Low. Object.Attrs() doesn't return the listing record's cached attributes for a virtual folder: with an empty file ID, it resolves the name with a download request first (b2/b2.go ~:625, ~:810). Code that reads a folder's timestamp from listing data would still see 1970 rather than a zero time.Time.

Expected

A folder entry's upload timestamp maps to the zero time.Time, so IsZero() identifies it, matching the #244 fix for keys.

Acceptance criteria

  • A listing with a delimiter that returns action: "folder" with uploadTimestamp: 0 yields a zero timestamp for that entry, tested with a literal B2-shaped fixture.
  • Regular file entries keep their exact millisecond timestamps (same test).
  • millitime is not changed globally: other callers (upload, finish, copy, hide, get-file-info, unfinished large files) have no documented zero or null meaning.

Links

Activity

  1. added this to the 0.10.0 milestone on Oct 30, 2026
  2. self-assigned this
    on Oct 30, 2026
  3. added theissue type on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions