mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Patch #734231: Update RiscOS support. In particular, correct
riscospath.extsep, and use os.extsep throughout.
This commit is contained in:
parent
5467d4c0e3
commit
a94568a753
27 changed files with 482 additions and 59 deletions
|
|
@ -91,6 +91,7 @@ zipimporter_init(ZipImporter *self, PyObject *args, PyObject *kwds)
|
|||
path = NULL;
|
||||
prefix = NULL;
|
||||
for (;;) {
|
||||
#ifndef RISCOS
|
||||
struct stat statbuf;
|
||||
int rv;
|
||||
|
||||
|
|
@ -102,6 +103,15 @@ zipimporter_init(ZipImporter *self, PyObject *args, PyObject *kwds)
|
|||
path = buf;
|
||||
break;
|
||||
}
|
||||
#else
|
||||
if (object_exists(buf)) {
|
||||
/* it exists */
|
||||
if (isfile(buf))
|
||||
/* it's a file */
|
||||
path = buf;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
/* back up one path element */
|
||||
p = strrchr(buf, SEP);
|
||||
if (prefix != NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue