Repository navigation
Windows: support of long paths - #495
Merged
Merged
Conversation
Files were opened with the ANSI API (CreateFileA, fopen, _access_s, _mkdir, FindFirstFileExA...), limited to MAX_PATH (260 characters) for the full path, so e.g. the reversibility data of a file in a directory of 200 characters could not be created. File names are now converted to the wide API, with the \\?\ prefix on the full path (from GetFullPathNameW, so relative paths, '/' and ".." are handled as before) if it is too long for the Win32 API, without the need of the LongPathsEnabled system setting. Short paths are used as before. This is used for reading and writing files, creating directories, listing directories and removing or renaming temporary files. FFmpeg 6.0 and later support long paths too (4.2 and 4.4 do not).
The x86 linker does not support EH continuation metadata (LNK1246 with /guard:ehcont), so it is enabled only for x64. File sizes from the directory listing are computed with uintmax_t, the shift of the 32-bit size_t by 32 was undefined behavior (C4293) in 32-bit builds.
A DPX file in a directory of 230 characters is encoded with the FFmpeg command displayed by rawcooked then decoded, its reversibility data and its decoded file have more than 260 characters (MAX_PATH on Windows). A sequence in a directory of more than 300 characters is encoded with --check then decoded in a new directory of more than 300 characters. The current directory stays shorter than MAX_PATH, else Git Bash does not start native programs. On Windows, FFmpeg needs to support long paths too (FFmpeg 6.0 and later).
Windows is checked by GitHub Actions (MSVC2026 build and all the tests of make check in Git Bash). The AppVeyor configuration built the removed MSVC2019 project and ran only a part of the tests (last update in 2020).
JeromeMartinez
force-pushed
the
Windows_LongPaths
branch
from
October 13, 2026 05:45
40540b5 to
0372b03
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.