-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
directory_iterator fails on UNC paths with Windows Server 2016 or Windows Server 2012 R2 #245
Comments
Apparently, Windows Server 2016 does not support any directory iteration requests using GetFileInformationByHandleEx for UNC paths. Fallback to NtQueryDirectoryFile in this case. Fixes #245.
The problem is apparently Windows Server not supporting its own damn APIs for UNC paths. Could you test if the code from |
Apparently, Windows Server 2016 does not support any directory iteration requests using GetFileInformationByHandleEx for UNC paths. Fallback to NtQueryDirectoryFile in this case. Fixes #245.
Apparently, Windows Server 2016 does not support any directory iteration requests using GetFileInformationByHandleEx for UNC paths. Fallback to NtQueryDirectoryFile in this case. Fixes #245.
Apparently, Windows Server 2016 does not support any directory iteration requests using GetFileInformationByHandleEx for UNC paths. Fallback to NtQueryDirectoryFile in this case. Fixes #245.
Unfortunately, it doesn't help. It goes to nt_query_directory_file () with file_directory_information_class but fails with the same error code: |
In that case, I'm sorry, but your use case won't be supported. I'm not aware of any other way to iterate over a directory that involves a handle and |
Ok but this is a regression, it was supported before... I've tried to map the UNC path into a drive (eg Z:\dir) but I have the same error. If I activate the C++17 mode and compile the program with std::filesystem (Microsoft implementation), it works fine on Windows Server 2016 and Windows Server 2012 R2. However, I would like to stay on the default C++ standard (e.g. C++14) and still use boost... |
Microsoft is using |
We used to use I could probably merge |
The change in #246 resolves my issue. Excellent, thanks a lot. |
I've upgraded boost from 1.67.0 to 1.79.0. I compile the following example with Visual Studio 2017. When I run the program, it fails with Windows Server 2016 or Windows Server 2012 R2:
Here is the output:
Exception: boost::filesystem::directory_iterator::construct: The parameter is incorrect [system:87]: "\\host\dir"
It's a valid UNC path (eg the directory exists). The same program works with Windows Server 2019 or Windows 10.
It doesn't work with Boost 1.79.0 and the latest code in develop branch. It works fine with Boost 1.67.0.
In dir_itr_create(), it iterates to the following paths without any success (error code = ERROR_INVALID_PARAMETER):
Any idea of what could be wrong?
The text was updated successfully, but these errors were encountered: