PictoPy icon indicating copy to clipboard operation
PictoPy copied to clipboard

BUG: Folder setup step shows the full Windows path as the folder name, not just the basename

Open ManasBagul23 opened this issue 1 month ago • 3 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

What happened?

In FolderSetupStep (the onboarding step that picks the first folder to import photos from), the selected folder's short name is extracted with:

{folder.split('/').pop()}

This only splits on the forward slash. On Windows, where pickSingleFolder() (the Tauri native folder picker) returns a backslash-separated path like C:\Users\me\Pictures\Vacation, split('/') finds no separator and .pop() returns the entire path — so the bold "folder name" line in the onboarding card shows the full absolute path instead of just Vacation.

Same bug class as #1528 (same fix: AddImagesToAlbumDialog's search filter had the identical split('/').pop() pattern for the same reason).

Steps to reproduce

  1. On Windows, open the onboarding flow and reach "Select Your First Folder".
  2. Click to select a folder, e.g. C:\Users\me\Pictures\Vacation.
  3. The bold name line shows the entire path instead of Vacation.

Expected behavior

The bold name line should show just the folder's basename, splitting on either / or \.

Code of Conduct

  • [x] I agree to follow the Code of Conduct

ManasBagul23 avatar Oct 05 '26 18:10 ManasBagul23

👋 Thanks for opening this issue! The maintainers will review it shortly. Till then, do not open any PR. This is a strict rule we like to follow around here :)

github-actions[bot] avatar Oct 05 '26 18:10 github-actions[bot]

⚠️ Potential Duplicate Issue (Semantic Match)

This issue appears semantically similar to the following issues in AOSSIE-Org/PictoPy:

  1. BUG: Windows path separator breaks image filename search in AddImagesToAlbumDialog (#1528, open) https://github.com/AOSSIE-Org/PictoPy/issues/1528 Similarity: 76.2%

  2. BUG:Long folder paths overflow in Folder Management settings UI (#1390, closed) https://github.com/AOSSIE-Org/PictoPy/issues/1390 Similarity: 61%

  3. BUG: Adding a folder also re-indexes similarly named sibling folders (unbounded LIKE prefix match in db_get_folder_ids_by_path_prefix) (#1553, open) https://github.com/AOSSIE-Org/PictoPy/issues/1553 Similarity: 59.4%

Please review before proceeding.

github-actions[bot] avatar Oct 05 '26 18:10 github-actions[bot]

Link your account with Gitcord

Thanks for opening this issue, @ManasBagul23!

To receive Discord notifications and contributor tracking for this organization:

  1. Join Discord: https://discord.gg/hjUhu33uAn
  2. In Discord, run /link ManasBagul23
  3. Paste the verification code into your GitHub bio (or a public gist)
  4. Click Verify in Discord (or run /verify-link ManasBagul23)

Once linked, Gitcord can notify you about assignments, mentions, and more.

— Posted by Gitcord

gitcordapp[bot] avatar Oct 05 '26 18:10 gitcordapp[bot]