homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sdeibel
Recipients
Date 2006年12月04日.22:34:06
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
In the Linux/Unix (non-Windows / non-OS2) implementation of listdir() in posixmodule.c, a check for errno != 0 is done after the loop. This assumes that errno is only set by readdir() but in fact it's possible for it to be set in PyUnicode_FromEncodedObject() if codecs are used in the conversion (actually that's a separate bug I'll report when I've investigated it futher).
To tighten this up, I'd recommend moving the errno != 0 clause in its entirety to just after the readdir() call and possibly resetting errno=0 before the readdir() call so it's clear the error really happened there.
I've attached a possible patch for this.
History
Date User Action Args
2007年08月23日 14:50:29adminlinkissue1608818 messages
2007年08月23日 14:50:29admincreate

AltStyle によって変換されたページ (->オリジナル) /