Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Unable to delete all orphaned files #139

Closed
danilichti opened this issue Oct 25, 2024 · 3 comments
Closed

[BUG] Unable to delete all orphaned files #139

danilichti opened this issue Oct 25, 2024 · 3 comments

Comments

@danilichti
Copy link

Describe the bug:

After scanning for orphaned files and Pearcleaner finding about 7Gb, I select all and click the red trash/delete icon but nothing happens.

Steps to reproduce:

  1. Scan for Orphaned Files
  2. Select All
  3. Click Trash

Expected behavior:

Pearcleaner trashes all found files.

Info:

  • OS: MacOS Sequioa 15.2
  • Pearcleaner Version: 3.9.2

Screenshots:

Screen Recording

Console Logs (For app crashes or hard to reproduce issues):

Timestamp Ty Process[PID:TID] 2024-10-25 06:15:55.558 E Pearcleaner[44857:1bad89] [com.alienator88.Pearcleaner:General] Reverse search processed successfully 2024-10-25 06:15:58.515 E Pearcleaner[44857:1bad89] [com.alienator88.Pearcleaner:General] Trash Error: { NSAppleScriptErrorAppName = Finder; NSAppleScriptErrorBriefMessage = "The operation can\134U2019t be completed because the file \134U201c.5c972686e7dc018ebeb91f7f8d6627b83acb782473d48975cf5ef210219c2e6c90b751b183e17a7376214e38d4134f6f312c9e2fe04edbd02399f38c7b1e720c\134U201d is locked."; NSAppleScriptErrorMessage = "Finder got an error: The operation can\134U2019t be completed because the file \134U201c.5c972686e7dc018ebeb91f7f8d6627b83acb782473d48975cf5ef210219c2e6c90b751b183e17a7376214e38d4134f6f312c9e2fe04edbd02399f38c7b1e720c\134U201d is locked."; NSAppleScriptErrorNumber = "-45"; NSAppleScriptErrorRange = "NSRange: {29, 60847}"; }

@alienator88
Copy link
Owner

Hi there, so according to the error:

NSAppleScriptErrorMessage = "Finder got an error: The operation can\134U2019t be completed because the file \134U201c.5c972686e7dc018ebeb91f7f8d6627b83acb782473d48975cf5ef210219c2e6c90b751b183e17a7376214e38d4134f6f312c9e2fe04edbd02399f38c7b1e720c\134U201d is locked.

You are trying to remove a file that is locked or probably in use by the system currently.
Side note, it's recommended to not select every single found file and delete all without looking through the list and confirming that it actually needs to be deleted. As mentioned in the warning that pops up the first time you open Orphaned file search view, it's not 100% accurate and can probably never be.
I would HIGHLY suggest looking at the files in the list you are deleting to make sure they aren't being in use like the above.
If you still want to go forward with deleting everything at once (I wouldn't do this), try unselecting that specific file and then delete again.
I might need to add a catch to skip files that are locked or in use to the deletion process.

@rhsev
Copy link

rhsev commented Dec 7, 2024

"I might need to add a catch to skip files that are locked or in use to the deletion process."
that would be a great help. Especially the search for orphaned files is very useful. I was initially confused that the Delete button didn't work at all. Now I know ...

@alienator88
Copy link
Owner

@rhsev this is in progress right now, talking about it here: #172
I added these checks which will be available in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants