JUCE is an open-source cross-platform C++ application framework for desktop and mobile applications, including VST, VST3, AU, AUv3, LV2 and AAX audio plug-ins.
I used RangedDirectoryIterator() to iterate over a directory with a file whose full path name is longer than MAX_PATH. That worked properly, but the returned File object isn't functional, e.g., existsAsFile() returns false, and reading fails.
A workaround is to create a new File object, prefixing the path name with \\?\.
This was apparently also encountered by multiple users in the forum.
What is the expected behaviour?
Deal with long filenames
Note: On new enough versions of Windows this can apparently be handled without prefixing \\?\ everywhere, by adding a manifest. That's a good enough solution IMHO. At least it would solve 80% of the limitation possibly with 20% of the work.
Detailed steps on how to reproduce the bug
I used
RangedDirectoryIterator()
to iterate over a directory with a file whose full path name is longer thanMAX_PATH
. That worked properly, but the returnedFile
object isn't functional, e.g.,existsAsFile()
returnsfalse
, and reading fails.A workaround is to create a new
File
object, prefixing the path name with\\?\
.This was apparently also encountered by multiple users in the forum.
What is the expected behaviour?
Deal with long filenames
Note: On new enough versions of Windows this can apparently be handled without prefixing
\\?\
everywhere, by adding a manifest. That's a good enough solution IMHO. At least it would solve 80% of the limitation possibly with 20% of the work.Operating systems
Windows
What versions of the operating systems?
all
Architectures
64-bit
Stacktrace
No response
Plug-in formats (if applicable)
No response
Plug-in host applications (DAWs) (if applicable)
No response
Testing on the
develop
branchThe bug is present on the
develop
branchCode of Conduct