Skip to content

Folders created via rclone have NULL size and are excluded from directory listings #575

Description

@spignelon

When rclone uploads files to a new folder path on teldrive, the folder records are inserted into the database with a NULL size. These folders are then excluded from directory listings in the UI.

Steps to reproduce:

  1. Use rclone copy to upload a local folder to a destination path that doesn't exist yet on teldrive
  2. Open the teldrive UI and navigate to the parent directory
  3. The newly created folder is not visible

What's happening:

The API response for the parent directory returns the correct total in meta.count but omits the NULL-size folder from the items array. For example, with 3 folders in the DB, meta shows count: 3 but only 2 items are returned — the one with NULL size is dropped.

Existing folders created through the web UI have their sizes stored correctly and appear fine. Only folders created by rclone (which doesn't set a size on creation) are affected.

Workaround:

Manually set the folder size in postgres by summing child file sizes. After that the folder appears correctly in the UI.

Possible fixes:

  • The API listing query should treat NULL size folders as valid and include them (or coalesce NULL to 0)
  • Or teldrive could compute folder sizes dynamically from child records rather than relying on a stored value

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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