Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
When trying to create/edit a file directly in the root or inside of an existing directory (Network Unit attached with sshfs,a few weeks ago this scenario works properly) using the write tool, Cursor attempts to run mkdir on the parent directory even though it already exists. This results in a permissions error (EPERM).
Steps to Reproduce
Have an existing directory (example: X:\PROJECT_ROOT)
Try to create a file directly in the root of that directory using the write tool
Expected Behavior
The file should be created without any issues, since the parent directory already exists.
Operating System
Windows 10/11
Version Information
2.4.27 (user setup)
Additional Information
The issue does NOT occur when trying to create a file inside a non-existing subfolder (for example, with a random name).
In that case, Cursor correctly creates the folder and then creates the file.
The bug seems to be in the logic that checks whether the parent directory exists before trying to create it.
Does this stop you from using Cursor
No - Cursor works, but with this issue