Skip to content

Fix ShareX library path handling - #29003

Merged
raycastbot merged 4 commits into
raycast:mainfrom
mralonsocorona:fix/sharex-exact-screenshots-folder
Jun 25, 2026
Merged

raycastbot merged 4 commits into
raycast:mainfrom
mralonsocorona:fix/sharex-exact-screenshots-folder

Conversation

@mralonsocorona

Copy link
Copy Markdown
Contributor

Summary

Fixes the ShareX Browse Library command so the configured screenshotsPath is treated as the final screenshots folder.

Previously, the command only scanned subfolders inside the configured path. This meant files stored directly in a custom ShareX screenshots folder were ignored.

Changes

  • Add support for media files located directly inside the configured screenshots folder.
  • Keep the existing behavior that scans recent subfolders, preserving support for organized ShareX folder structures.
  • Reuse a shared media-file regex for direct files and subfolder files.
  • Rename the resolved path variable from basePath to screenshotsPath for clarity.

Validation

  • npm run lint
  • npm run build

Fixes #28975

@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: sharex Issues related to the sharex extension platform: Windows labels Jun 24, 2026
@raycastbot

Copy link
Copy Markdown
Collaborator

Thank you for your first contribution! 🎉

🔔 @zxc-rv you might want to have a look.

You can use this guide to learn how to check out the Pull Request locally in order to test it.

📋 Quick checkout commands
BRANCH="fix/sharex-exact-screenshots-folder"
FORK_URL="https://github.com/mralonsocorona/extensions.git"
EXTENSION_NAME="sharex"
REPO_NAME="extensions"

git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run dev

We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 15 business days.

@greptile-apps

greptile-apps Bot commented Jun 24, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes ShareX Browse Library handling for custom screenshot folders. The main changes are:

  • Includes media files stored directly in the configured screenshots folder.
  • Keeps scanning recent subfolders for organized ShareX folder layouts.
  • Reuses one media-file extension filter for direct files and subfolder files.
  • Renames the resolved path variable for clarity.

Confidence Score: 5/5

The change is merge-safe: it broadens the existing ShareX media discovery path while preserving the previous subfolder scanning behavior.

The touched code is small and localized to the Browse Library command, with no accepted correctness or security issues identified.

T-Rex T-Rex Logs

What T-Rex did

  • Before-state review: observed the trex-artifacts/sharex-library-path-handling-01-before.log showed the base root-direct.png was omitted and the assert for root direct media listed failed, while subfolder-recent.jpg was included and passed.
  • After-state verification: observed the trex-artifacts/sharex-library-path-handling-02-after.log shows head lists Screenshots/root-direct.png and 2026-06-recent/subfolder-recent.jpg, with both assertions passing.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (3): Last reviewed commit: "Update CHANGELOG.md" | Re-trigger Greptile

Comment thread extensions/sharex/CHANGELOG.md Resolved
@pernielsentikaer pernielsentikaer self-assigned this Jun 25, 2026

@pernielsentikaer pernielsentikaer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, approved 🔥

@raycastbot
raycastbot merged commit d5a6a11 into raycast:main Jun 25, 2026
3 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

@raycastbot

Copy link
Copy Markdown
Collaborator

🎉 🎉 🎉

Such a great contribution deserves a reward, but unfortunately we couldn't find your Raycast account based on your GitHub username (@mralonsocorona).

Please link your GitHub account to your Raycast account to receive your credits and soon be able to exchange them for some swag.

almatkai pushed a commit to almatkai/raymes-extensions that referenced this pull request Jul 13, 2026
* fix(sharex): include files from configured screenshots folder

* chore(sharex): update changelog

* chore(sharex): use changelog merge date placeholder

* Update CHANGELOG.md

---------

Co-authored-by: raycastbot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extension fix / improvement Label for PRs with extension's fix improvements extension: sharex Issues related to the sharex extension platform: Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ShareX] Use exact screenshots folder path instead of appending /screenshots/

3 participants