microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
111.2k stars 6.54k forks source link

Cannot modify files because the file is open in Preview Handler Surrogate Host when developer files preview is enabled #16699

Closed sphars closed 2 years ago

sphars commented 2 years ago

Microsoft PowerToys version

0.56.1

Running as admin

Area(s) with issue?

Developer file preview

Steps to reproduce

When Enable developer files preview is enabled, any attempts to modify a file that is actively being previewed in Explorer will fail (at least .txt files). File modifications that I found that will fail include renaming the file and trying to delete the file.

Renaming steps:

  1. Create a new text document (right-click -> New -> Text Document) or find an existing file.
  2. The new file is pre-selected to be renamed. You can also see that the preview pane is previewing the empty file.
  3. Attempt to rename the file.
  4. The action cannot be completed:

image

This error also appears when renaming a file by going into the file's Properties dialog.

Same thing when attempting to delete the file:

  1. Select the file in Explorer. Confirm the preview pane is previewing the file.
  2. Try to delete the file.
  3. The action cannot be completed:

image

Other actions such as copy/paste seem to work as expected.

Bug report: PowerToysReport_2022-03-01-21-32-01.zip

(I did search for an existing issue but couldn't find one, apologies if this is a duplicate).

✔️ Expected Behavior

Attempts to rename (via right-click or F2) or delete a file succeeds and the file is renamed or deleted respectively.

❌ Actual Behavior

The action fails because the file is open in Preview Handler Surrogate Host

Other Software

No response

Aaron-Junker commented 2 years ago

This should actually be fixed with this version, but I didn'ttest it with renamwing files. I will look if I can repro it

htcfreek commented 2 years ago

It's edge that keeps file in use.

sphars commented 2 years ago

Just tested the new update, I can confirm that this issue is no longer present in v0.56.2. Thanks for the fix @Aaron-Junker!

Aaron-Junker commented 2 years ago

Just tested the new update, I can confirm that this issue is no longer present in v0.56.2. Thanks for the fix @Aaron-Junker!

Thank you for double-checking it.

par4dise commented 2 years ago

Disagree with previous comments, I still have this issue in 0.56.2. More accurately, I have the issue most of the time... but sometimes it works! (no identified reason to that) Windows 10 Pro 19041.1415

jaimecbernardo commented 2 years ago

This is fixed with 0.57.0. Please head over to https://aka.ms/installpowertoys