Skip to content

Fix long cache file path on Windows#3065

Merged
zcbenz merged 1 commit intoml-explore:mainfrom
zcbenz:win-long-path
Jan 26, 2026
Merged

Fix long cache file path on Windows#3065
zcbenz merged 1 commit intoml-explore:mainfrom
zcbenz:win-long-path

Conversation

@zcbenz
Copy link
Copy Markdown
Collaborator

@zcbenz zcbenz commented Jan 26, 2026

By adding \\?\ before file paths we can make std::filesystem APIs support long file path on Windows.
https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation

Also add .ilk file (output of MSVC) to .gitignore, and slightly organize the .gitignore file.

Copy link
Copy Markdown
Member

@angeloskath angeloskath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's pretty cool but out of curiosity what do we lose by simply using a smaller max_file_name_length ? Or was that actually not solving the issue at all?

@zcbenz
Copy link
Copy Markdown
Collaborator Author

zcbenz commented Jan 26, 2026

The max_file_name_length only limits the length of filename, which works perfectly for mac, but for Windows the there is a limitation on the whole path rather than the filename part.

Copy link
Copy Markdown
Member

@angeloskath angeloskath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Thanks for the fix.

@zcbenz zcbenz merged commit 343ddf0 into ml-explore:main Jan 26, 2026
16 checks passed
@zcbenz zcbenz deleted the win-long-path branch January 26, 2026 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants