diff options
Diffstat (limited to 'Modules/zipimport.c')
-rw-r--r-- | Modules/zipimport.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Modules/zipimport.c b/Modules/zipimport.c index 9f7da72..f0eaef5 100644 --- a/Modules/zipimport.c +++ b/Modules/zipimport.c @@ -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) |