Comment 4 for bug 338653

Revision history for this message
Martin Pool (mbp) wrote : Re: OSError is printed without a useful filename

And that's correct, the C and Pyrex code needs to provide the filename and does not.

295 if path != "" and path != '.':
296 # we change into the requested directory before reading, and back at the
297 # end, because that turns out to make the stat calls measurably faster than
298 # passing full paths every time.
299 orig_dir_fd = open(".", O_RDONLY, 0)
300 if orig_dir_fd == -1:
301 raise OSError(errno, strerror(errno))
302 if -1 == chdir(path):
303 raise OSError(errno, strerror(errno))