Skip to content

Library.create_new_library checks existence wrong #1155

@b4nt0

Description

@b4nt0

The create_new_library method first checks the existence of the library, and then creates the library only if it does not exist.
However, when checking existence, it uses library_name, while when creating it uses safe_name. If the library_name is not equal to the safe_name, the next time the library existence check will not succeed, however creation of the library would also fail - because the function attempts to create a different name.

The correct logic would be to convert the library name to the safe name as early as possible, and conduct further manipulations (checking existence etc.) with the safe name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions