-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Warning for user when Windows default Path Limit is exceeded #10046
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of thoughts:
error
is an exception, so you need tostr()
it first.- We should probably check
error.errno
to make sure we’re catching aFileNotFoundError
. - The error message should include a link to some Microsoft documentation. I don’t except people having Long Paths off would understand what set LongPathsEnabled to 1 means.
For the second suggestion. Can I go forward with a check like |
Yeah, sounds right to me. |
And last question I had for the final suggestion, I am going forward with this microsoft documentation in particular: https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd#enable-long-paths-in-windows-10-version-1607-and-later |
Damn, that’s a long one. I guess that’s the best we can have though, since it’s Microsoft. |
Yeah that is the only decent one I found which belonged exclusively to Microsoft. As of now I have updated the PR with all the requested changes, please take a look when it is possible for you. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Happy to have this merged once CI is happy. :)
Thanks for your contribution @OBITORASU! ^>^ |
Description
This PR generates a warning message for the end-user informing them about the potential errors which might be caused if they have Long Paths disabled on their Windows system. I have used:
as the means to check the host OS as suggested by the maintainers and added an if statement to check for the
260
default path length limit when Long Paths is disabled. The if statement will successfully trigger a warning usinglogger.warning
in case the host OS is Windows and the error message length (which also contains the path) is greater than 260 characters.Fixes Issue #10045