-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
win api and fs module: filepath too long, ntfs on windows 64 #19311
Comments
WinAPI does support very long file names, but one need to use Unicode variants of file functions (that ends with |
Thank you for the tip. I was able to solve this by changing all the fwd slashes to escaped backslashes, as well as providing the prefix (escaped as well). I could have also done a raw string: let path = "\\\\?\\K:\\IT\\testing\\";
let sub1 = "wejhflkjwehfhwelhfkljwehfhkwehfkjlhwekjlfhkjwehfhwejkhfuiweh nweuiyfhuih4389578347589069045uyrt98y78yrf78gyv78yr78f76345yughvuidfu89yg7845y78tyg8y9845y78gy7845hy5678346578y78ghvcx jxbzcvjsbguyfg764wtr763 85474678 69346 35\\";
let sub2 = "4375848v 9t489bu89cb n89fg89gf7g89fn89g7df98 g79r 7g9re78976re78er78 t60we6re7er6w7878w46t7834545bytbxcvu8v6r7 fye49th4ui 7878t6r78tg645t6 46uygt78g6xrt645jk6h78t7y8dxzg78e5 ht6455ytr78sr6e4tnovn47654t6\\"; |
There is an ongoing effort to overhaul the |
Using |
Path reform has now landed, but I'm not sure if this was addresed or not. @alexcrichton ? |
Unless you explicitly use verbatim paths then this issue still exists. We'd need to do magic behind the scenes to convert non-verbatim paths to verbatim paths in order to really resolve this issue. |
While proposed in #27916, the standard library is pretty unlikely to transform paths by default. That being said all the functions we have today can consume verbatim paths, so I'm going to close this as basically "not much to do here". There may be a few points in the compiler which need to be updated, but follow-up issues can be opened for those. |
Log build script error output in `load_cargo::load_workspace_at`
rust is unable to list directory contents on mounted ntfs drive. ntfs can hold extremely long folder structures but the native win API cannot browse them. This is not always a problem, for example: cygwin's LS executable compiled for windows, or java's file modules can browse these just fine since they do not rely on the win api. linux and mac osx can browse these window server shared folders as well. Does Rust for windows rely on the win api? it's unable to list contents in a deeply nested folder.
See below example, where K is a mounted SMB share that resides on a windows server (this is compile on latest rust 32bit for windows)
The text was updated successfully, but these errors were encountered: