Skip to content
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

gh-71916: Give a better error msg when a file path is too long on Windows #20844

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ZackerySpytz
Copy link
Contributor

@ZackerySpytz ZackerySpytz commented Jun 12, 2020

@ZackerySpytz
Copy link
Contributor Author

It would be nice to add a test that checks the error message when an empty string is passed to open().

@serhiy-storchaka serhiy-storchaka requested a review from a team July 15, 2020 18:34
@@ -418,7 +421,12 @@ _io_FileIO___init___impl(fileio *self, PyObject *nameobj, const char *mode,

fd_is_own = 1;
if (self->fd < 0) {
#ifdef MS_WINDOWS
PyErr_SetExcFromWindowsErrWithFilenameObject(
PyExc_OSError, _doserrno, nameobj);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does the error look like in the path too long case with this change? Would it be more helpful if we checked the error code and used our own message?

Copy link
Member

@iritkatriel iritkatriel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has a merge conflict now, as well as an unanswered review.

@bedevere-app
Copy link

bedevere-app bot commented Nov 24, 2023

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@erlend-aasland erlend-aasland changed the title bpo-27729: Give a better error msg when a file path is too long on Windows gh-71916: Give a better error msg when a file path is too long on Windows Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants