Skip to content

Library reopen doesn't check to see if path is valid #118

Closed

Description

@Loran425

Expected Behavior

When opening the program if the saved library is no longer valid the program will show an information or error prompt informing the user of the error.

Current Behavior

If the library path is no longer valid, TagStudio will attempt to open the old library with an error in the terminal but will not tell the user of the error via the interface.

Possible Solution

Verify the library path is None or an existing directory when starting up if not either of these, show a popup informing the user.

Steps to Reproduce

  1. Open a library
  2. Close Tagstudio
  3. Delete or rename the library folder in the file manager
  4. Reopen Tagstudio
[ERROR] No existing TagStudio library found at 'C:\Users\Loran425\Pictures\Item Icons\tradingicons\Testing'. Creating one.
Traceback (most recent call last):
  File "C:\Users\Loran425\PycharmProjects\TagStudio\tagstudio\src\core\library.py", line 555, in create_library
    self.verify_ts_folders()
  File "C:\Users\Loran425\PycharmProjects\TagStudio\tagstudio\src\core\library.py", line 575, in verify_ts_folders
    os.mkdir(full_ts_path)
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\Users\\Loran425\\Pictures\\Item Icons\\tradingicons\\Testing\\.TagStudio'

Activity

  1. gabrieljreed commented on May 2, 2024

    @gabrieljreed
    Contributor

    I'm not able to repro this bug. Maybe it's Windows exclusive? (On Mac currently)

  2. abby-freakazoid commented on May 2, 2024

    @abby-freakazoid
    Contributor

    I'm not able to repro this bug. Maybe it's Windows exclusive? (On Mac currently)

    I'm able to reproduce this bug on Linux.
    The program doesn't outright crash, but the console output says:

    TagStudio Frontend (Qt) Crashed! Press Enter to Continue...

  3. added a commit that references this issue on May 2, 2024
  4. Loran425 commented on May 2, 2024

    @Loran425
    CollaboratorAuthor

    Fixed by #122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working as intendedgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions