Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Windows bundled llama-server.exe is missing `longPathAware`: GGUF paths > 260 chars fail with "No such file or directory" even when the file exists and LongPathsEnabled=1

Open Beginner friendly
#30,935 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@origin-labs-ai is already working on this.

Since Oct 24, 2026.

  • #31102 by @origin-labs-ai — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
cmake, cpp

Research direction

Start by locating the Windows binary manifest and build configuration, including the CMake or linker manifest step mentioned in the issue. Check how the bundled llama-server.exe receives its manifest, then verify that the built executable declares longPathAware and can load a GGUF from a path longer than 260 characters with Windows long path support enabled.

Written by the indexing model from the issue text.

Description

bug-unconfirmed
Name and Version

Windows bundled llama-server.exe (x64) shipped with Unsloth Studio; Windows 11 Build 22631, LongPathsEnabled=1

Operating systems

No response

Which llama.cpp modules do you know to be affected?

No response

Command line
llama-server.exe -m "C:\Users\<name>\.cache\huggingface\hub\models--xxx\snapshots\<sha>\...model.gguf"  (absolute path > 260 chars)
Problem description & steps to reproduce

Environment

  • Windows 11 (Build 22631), LongPathsEnabled=1 (HKLM\SYSTEM\CurrentControlSet\Control\FileSystem)
  • Unsloth Studio bundled llama-server.exe (Windows, x64)

Bug / expected behavior
Loading a GGUF whose absolute path exceeds 260 characters fails with failed to open GGUF file ... (No such file or directory), even though the file exists and is readable. Expected: the file should load, since the OS long-path support is enabled.

Steps to reproduce

  1. Place a valid GGUF under a deep directory so the absolute path is > 260 chars (e.g. a Hugging Face cache path like C:\Users\<name>\.cache\huggingface\hub\models--xxx\snapshots\<sha>\...model.gguf, 276 chars in our case).
  2. Run llama-server.exe -m <that path>.
  3. Observe: error: failed to open GGUF file '<path>' (No such file or directory).

Root cause
The bundled exe's application manifest does not declare longPathAware. Even with the system-wide LongPathsEnabled=1, a process only gets long-path support after its manifest declares <longPathAware xmlns="urn:schemas-microsoft-com:windows:manifest.v3">true</longPathAware>. Without it, CRT/fopen-style path handling falls back to the legacy MAX_PATH (260) behavior and fails with a misleading ENOENT.

We verified:

  • The same file opens fine from .NET / PowerShell (File.OpenRead), which is why the "No such file" error is easy to misdiagnose as a broken/corrupted engine.
  • A short-path model (158 chars) loads fine on the same build, confirming the engine is healthy.
  • Patching the exe in place by injecting longPathAware=true into its RT_MANIFEST (via UpdateResource) makes the 276-char model load successfully; short-path models remain unaffected.

Suggested fix
Declare longPathAware in the manifest used to build the Windows binaries (e.g. via the linker/mt.exe manifest step or VS_MANIFEST in CMake). Alternatively, normalize model paths with the \\?\ prefix at the file-open layer in llama.cpp (ggml/common), which also covers users who cannot edit the exe manifest.

Impact
Hugging Face cache paths are deep by design (nested models--* / snapshots/<40-char-sha>), so Windows users loading GGUFs straight from the HF cache hit this frequently. A one-line manifest fix in the build config would remove an entire class of hard-to-diagnose load failures.

First Bad Commit

No response

Relevant log output
Logs

Dominant language
C++
Stars
132k
Forks
24.6k
Avg merge
2d 1h
Merged PRs (30d)
500

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ggml-org/llama.cpp

All issues in ggml-org/llama.cpp

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.