Right-click opened Terminal window does not release folder handle after navigated away #18223

Closed
opened 2026-01-31 06:07:20 +00:00 by claunia · 2 comments
Owner

Originally created by @ghost on GitHub (Aug 20, 2022).

Windows Terminal version

1.14.2281.0

Windows build number

10.0.19044.1889

Other Software

No response

Steps to reproduce

  1. Create a new folder with arbitrary name. E.g. sample.
  2. Using Windows Explorer, navigate into this sample folder. Open a Windows Terminal with right-click context menu.
  3. Close the Windows Explorer window.
  4. Switch back to the Terminal window, navigate away from this folder. E.g. cd ...
  5. Execute rmdir sample within the same Terminal. You should get an error of The process cannot access the file because it is being used by another process..
  6. Close the Terminal window and try to delete that folder again. You should now able to get rid of it without issues.

Expected Behavior

The folder handle should get released once navigated away.

Actual Behavior

Get an error of The process cannot access the file because it is being used by another process..

Originally created by @ghost on GitHub (Aug 20, 2022). ### Windows Terminal version 1.14.2281.0 ### Windows build number 10.0.19044.1889 ### Other Software _No response_ ### Steps to reproduce 1. Create a new folder with arbitrary name. E.g. `sample`. 2. Using `Windows Explorer`, navigate into this `sample` folder. Open a `Windows Terminal` with right-click context menu. 3. Close the `Windows Explorer` window. 4. Switch back to the `Terminal` window, navigate away from this folder. E.g. `cd ..`. 5. Execute `rmdir sample` within the same `Terminal`. You should get an error of `The process cannot access the file because it is being used by another process.`. 6. Close the `Terminal` window and try to delete that folder again. You should now able to get rid of it without issues. ### Expected Behavior The folder handle should get released once navigated away. ### Actual Behavior Get an error of `The process cannot access the file because it is being used by another process.`.
claunia added the Needs-TriageIssue-BugNeeds-Tag-Fix labels 2026-01-31 06:07:20 +00:00
Author
Owner

@j4james commented on GitHub (Aug 20, 2022):

I think this is probably a duplicate of #5506.

@j4james commented on GitHub (Aug 20, 2022): I think this is probably a duplicate of #5506.
Author
Owner

@ghost commented on GitHub (Aug 20, 2022):

@j4james My bad, will follow that issue instead.

@ghost commented on GitHub (Aug 20, 2022): @j4james My bad, will follow that issue instead.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#18223