# Glob file search returns zero results when target\_directory is on another drive (Windows, multi-root)

**URL:** <https://forum.cursor.com/t/glob-file-search-returns-zero-results-when-target-directory-is-on-another-drive-windows-multi-root/160185>\
**Category:** Bug Reports\
**Tags:** indexing, windows\
**Created:** [May 9, 2026, 5:46pm UTC](https://forum.cursor.com/t/glob-file-search-returns-zero-results-when-target-directory-is-on-another-drive-windows-multi-root/160185 "2026-05-09T17:46:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![clayrabbit](https://avatars.discourse-cdn.com/v4/letter/c/779978/32.png) [@clayrabbit](https://forum.cursor.com/u/clayrabbit)\
**Post date:** [May 9, 2026, 5:46pm UTC](https://forum.cursor.com/t/glob-file-search-returns-zero-results-when-target-directory-is-on-another-drive-windows-multi-root/160185/1 "2026-05-09T17:46:43Z")

</div>

### Where does the bug appear (feature/product)?

Cursor IDE

### Describe the Bug

The **Glob** tool used by the Agent (and possibly the same backend as “find files by pattern”) returns **0 files** when `target_directory` is set to a project folder on **drive D:** on Windows, even though the folder exists, contains many files, and **Read** / **Grep** on the same paths work. This is not limited to dotfiles (e.g. `.cursorignore`); patterns like `**/*` and `*.yml` also return no matches.

### Steps to Reproduce

1. On Windows, add a workspace folder on **D:** (e.g. `D:\docker\my-project`) with visible files such as `docker-compose.yml`, `.cursorignore`, etc.

2. In the Agent, run **Glob** with `target_directory` = that folder (e.g. `D:\docker\my-project`) and `glob_pattern` = `**/*` or `*.yml`.

3. Observe **0 files found**.

4. Optionally: run **Grep** with `path` set to the same folder and a string known to exist (e.g. in `docker-compose.yml`) — matches are returned.

5. Optionally: **Read** the same file by absolute path — succeeds.

### Expected Behavior

Glob should list files under the given target\_directory according to glob\_pattern, consistent with the filesystem and with other tools (Grep, Read) operating on the same absolute path on D:

### Operating System

Windows 10/11

### Version Information

Version: 3.3.27 (system setup)  
VSCode Version: 1.105.1  
Commit: 80b138a7a0a948e1a798e9ed7867d76a1ba9a310  
Date: 2026-05-08T02:26:22.498Z  
Layout: editor  
Build Type: Stable  
Release Track: Default  
Electron: 39.8.1  
Chromium: 142.0.7444.265  
Node.js: 22.22.1  
V8: 14.2.231.22-electron.0  
OS: Windows\_NT x64 10.0.26200

### Additional Information

- **Multi-root workspace** may be relevant: e.g. roots on **C:** and **D:** ; Glob with `target_directory` empty may only surface files under one root, while explicit `D:\...` still returns 0 for Glob.

- **NTFS ACL** on `D:\` and the project folder was checked: owner is the same user with **Full control** ; ordinary shell listing works. Unlikely to be permissions.

- Suggests Glob’s index or path handling for **non–C: drives** or **explicit absolute `target_directory`** on Windows.

### Does this stop you from using Cursor

No - Cursor works, but with this issue

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [May 9, 2026, 6:10pm UTC](https://forum.cursor.com/t/glob-file-search-returns-zero-results-when-target-directory-is-on-another-drive-windows-multi-root/160185/5 "2026-05-09T18:10:50Z")

</div>

Hey, thanks for the detailed report. This is a known issue with Glob on Windows. In a multi-root workspace, when `target_directory` is on a different drive than the workspace root, relative paths are calculated wrong and Glob returns 0 results. Read and Grep still work because they use different execution paths.

The issue is being tracked, but I can’t share an ETA for a fix yet.

As a workaround, you can add a rule in `.cursor/rules` so the agent uses the terminal to search for files:

```plaintext
When searching for files in this project, prefer using terminal commands
(find, grep, rg) instead of the built-in glob/grep tools, since this
workspace spans multiple drives on Windows where built-in Glob currently
returns no results.

```

Another option is to open the D: project as a single-root workspace without the C: root. Then Glob works correctly within a single drive.

When there’s an update on the fix, I’ll reply in the thread.

---

<div class="post-metadata">

**Author:** ![clayrabbit](https://avatars.discourse-cdn.com/v4/letter/c/779978/32.png) [@clayrabbit](https://forum.cursor.com/u/clayrabbit)\
**Post date:** [May 10, 2026, 9:31am UTC](https://forum.cursor.com/t/glob-file-search-returns-zero-results-when-target-directory-is-on-another-drive-windows-multi-root/160185/7 "2026-05-10T09:31:42Z")

</div>

I can confirm this is broader than cross-drive paths.

After additional testing, the issue reproduces in **multi-root workspaces even when all roots are on the same drive (C:)**. In my case, `Glob` returned empty/wrong results for a valid `target_directory` on C:, while shell listing and direct file reads still worked. When I switched to a single-root workspace, `Glob` behavior became normal again.

So the key factor appears to be **multi-root context itself** , not specifically `D:` vs `C:`

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [May 10, 2026, 11:46am UTC](https://forum.cursor.com/t/glob-file-search-returns-zero-results-when-target-directory-is-on-another-drive-windows-multi-root/160185/8 "2026-05-10T11:46:23Z")

</div>

Thanks for running the extra test, it’s a helpful signal. The fact that the bug reproduces even in a same drive multi-root setup confirms the root cause is in multi-root path handling, not anything cross-drive specific. That matches how Glob resolves `target_directory` relative to the first workspace root.

Same workarounds for now: either open the project as a single-root workspace, or use `.cursor/rules` to tell the agent to use the terminal for file search. I’ll post an update in the thread once we have a fix.

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [May 20, 2026, 4:39pm UTC](https://forum.cursor.com/t/glob-file-search-returns-zero-results-when-target-directory-is-on-another-drive-windows-multi-root/160185/10 "2026-05-20T16:39:27Z")

</div>

Hey @clayrabbit,

Quick update: the fix for Glob returning 0 results in multi-root workspaces, including the cross-drive case, will ship in Cursor 3.6. Please try again after you update. Thanks for the extra test with a same-drive multi-root setup, it was a helpful signal that confirmed the issue is specifically in multi-root path handling.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/127254_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [June 7, 2026, 3:39pm UTC](https://forum.cursor.com/t/glob-file-search-returns-zero-results-when-target-directory-is-on-another-drive-windows-multi-root/160185/11 "2026-06-07T15:39:58Z")

</div>

Closed on June 7, 2026, 3:39pm UTC

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
