Skip to content

Error 502 while trying to access my db file #10

Description

@LifoSuello

Hi, I have a problem when trying to access my db file (https://disbox-server.fly.dev/files/get/HASH)

The problem may come from the disbox-file.js at line 50:

if (!entry.parent_id in allDirectories)

The problem is that JavaScript evaluates this as:

if ((!entry.parent_id) in allDirectories)

It checks if the string "true" or "false" is a key in "allDirectories". The check never works so the guard that was supposed to create a placeholder for missing parents never fires
The fix for that line is:

if (!(entry.parent_id in allDirectories))

This affects DB with orphaned entries, which could be my case I guess
It's completely safe to deploy since it doesn't affect files with no orphans. It just prevent DB with orphans entries to fail, so the db can be retrieved

Thanks you so much for your work, that's a really good project !!

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