diff -r f3bd51cdd958 Modules/posixmodule.c --- a/Modules/posixmodule.c Fri Sep 28 15:19:42 2012 -0400 +++ b/Modules/posixmodule.c Fri Sep 28 21:43:54 2012 +0100 @@ -4042,7 +4042,8 @@ Py_END_ALLOW_THREADS if (!result) { - return_value = win32_error_object(function_name, dst.object); + /* See comment below regarding path_error. */ + return_value = win32_error_unicode(function_name, NULL); goto exit; } @@ -4057,7 +4058,15 @@ Py_END_ALLOW_THREADS if (result) { - return_value = path_error(function_name, &dst); + /* + * Which filename should we display as part of the error? + * It depends--for some errnos it should be src, for some + * it should be dst. (Sadly we can't display both, yet.) + * The optimal fix would be to switch on errno and pick + * the appropriate path for that particular error. Maybe + * in the future! + */ + return_value = posix_error(); goto exit; } #endif