Skip to content

ArbitraryFileIdManager.index() does not return the existing file ID if present #82

Closed
@dlqqq

Description

@dlqqq

Description

The implementation of the index() method always creates a new file ID, even if one already exists:

def index(self, path: str) -> str:
    # create new record
    with self.con:
        id = self._create(path)
        return id

It should check get_id() first and return it if it exists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions