cpython: 20ea12222b0e (original) (raw)

Mercurial > cpython

changeset 99469:20ea12222b0e 3.5

Issue #25717: Tolerate fstat() failures in the FileIO constructor This restores 3.4 behaviour, which was removed by revision 3b5279b5bfd1. The fstat() call fails with ENOENT for a Virtual Box shared folder filesystem if the file entry has been unlinked, e.g. for a temporary file. [#25717]

Martin Panter vadmium+py@gmail.com
date Sun, 06 Dec 2015 03:15:05 +0000
parents 6211c41106cc
children 8c978cbe057c 02d2127fda6c
files Misc/NEWS Modules/_io/fileio.c
diffstat 2 files changed, 31 insertions(+), 12 deletions(-)[+] [-] Misc/NEWS 4 Modules/_io/fileio.c 39

line wrap: on

line diff

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -22,6 +22,10 @@ Core and Builtins Library ------- +- Issue #25717: Restore the previous behaviour of tolerating most fstat()

--- a/Modules/_io/fileio.c +++ b/Modules/_io/fileio.c @@ -250,6 +250,7 @@ static int int *atomic_flag_works = NULL; #endif struct _Py_stat_struct fdfstat;

+#ifdef MS_WINDOWS

+#else

+#endif

#if defined(S_ISDIR) && defined(EISDIR)

#endif /* defined(S_ISDIR) */ #ifdef HAVE_STRUCT_STAT_ST_BLKSIZE

#endif /* HAVE_STRUCT_STAT_ST_BLKSIZE */

#if defined(MS_WINDOWS) || defined(CYGWIN) /* don't translate newlines (\r\n <=> \n) */