[Python-checkins] Do not check isabs() on Windows. (gh-28584)

ericsnowcurrently webhook-mailer at python.org
Mon Sep 27 12:52:42 EDT 2021


https://github.com/python/cpython/commit/16b5bc68964c6126845f4cdd54b24996e71ae0ba
commit: 16b5bc68964c6126845f4cdd54b24996e71ae0ba
branch: main
author: Eric Snow <ericsnowcurrently at gmail.com>
committer: ericsnowcurrently <ericsnowcurrently at gmail.com>
date: 2021-09-27T10:52:19-06:00
summary:

Do not check isabs() on Windows. (gh-28584)

I missed this in gh-28550.

https://bugs.python.org/issue45211

files:
M Python/fileutils.c

diff --git a/Python/fileutils.c b/Python/fileutils.c
index 2492d0567d84a..ecfdc5758eb84 100644
--- a/Python/fileutils.c
+++ b/Python/fileutils.c
@@ -2138,7 +2138,9 @@ wchar_t *
 _Py_join_relfile(const wchar_t *dirname, const wchar_t *relfile)
 {
     assert(dirname != NULL && relfile != NULL);
+#ifndef MS_WINDOWS
     assert(!_Py_isabs(relfile));
+#endif
     size_t maxlen = wcslen(dirname) + 1 + wcslen(relfile);
     size_t bufsize = maxlen + 1;
     wchar_t *filename = PyMem_RawMalloc(bufsize * sizeof(wchar_t));



More information about the Python-checkins mailing list