-
Notifications
You must be signed in to change notification settings - Fork 11
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
Deal with max path size on Windows #5
Comments
I think the hard part would be to test and check all corner cases. Perhaps I'll be able to take this issue but can't guarantee. |
* Manually implemented windows File Namespace name generation * added some unit tests closes scullionw#5
* Manually implemented windows File Namespace name generation * added some unit tests closes scullionw#5
I'm going to finish PR soon. I've got time to dig into Rust. My initial take was to fix filename generation, and I've done it. But now I see that it can be achieved using GetFileInformationByHandleEx , as it accepts HANDLE and gives various info form file (we already are using similar funtion for getting information on regular size). Using handles must be marginally faster. Also I've found other issues with apparent size on Windows platform: it shows size inconsistent with windows explorer for small files. Windows explorer shows 0, which means it's stored inside parent directory, but current solution shows size. And also we don't calculate size of alternate file streams, but that calculation can be costly on performance. I think that inconsitencies can be addressed later. P.S. source material: https://devblogs.microsoft.com/oldnewthing/20160427-00/?p=93365 |
On windows maximum length for a path is MAX_PATH, which is defined as 260 characters.
There are some ways to define path in a specific way, so it would allow 32,767 characters is approximate.
It could work with our API call on Windows 10, Version 1607, and Later if Registry key is configured, or APP manifest provided.
I assume it's better to stick with
"\\?\"
prefix and support a wider range of Windows versions.links:
Creating this issue as I've found TODO in code.
The text was updated successfully, but these errors were encountered: