Kaydet (Commit) 2d5914b1 authored tarafından Mark Hammond's avatar Mark Hammond

Fix [ 947405 ] os.utime() raises bad exception for unicode filenames

üst 9f1340b9
......@@ -2004,8 +2004,13 @@ posix_utime(PyObject *self, PyObject *args)
Py_END_ALLOW_THREADS
#endif /* HAVE_UTIMES */
}
if (res < 0)
if (res < 0) {
#ifdef Py_WIN_WIDE_FILENAMES
if (have_unicode_filename)
return posix_error_with_unicode_filename(wpath);
#endif /* Py_WIN_WIDE_FILENAMES */
return posix_error_with_filename(path);
}
Py_INCREF(Py_None);
return Py_None;
#undef UTIME_ARG
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment