-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
osdep/io: normalize relative or long paths on Windows and convert to UNC
Allow mp_open and mp_stat to work with paths which reach or exceed MAX_PATH, by normalizing and changing them to UNC if needed. This allows to open long absolute dos paths from CLI or the client interface. Relative paths are also converted because CreateFileW fails when cwd + path >= MAX_PATH. Using GetFullPathNameW has also nice side effect of removing duplicated path separators and converting them to \.
- Loading branch information
Showing
2 changed files
with
38 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters