diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2003-05-10 07:36:56 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2003-05-10 07:36:56 (GMT) |
commit | a94568a7535de60f1144e4eea0d027b87017a4b4 (patch) | |
tree | 5a8f696ca440a296b18521be17920b48f2021e4c /Modules/zipimport.c | |
parent | 5467d4c0e31e9db305a4899a44d7978f83e96649 (diff) | |
download | cpython-a94568a7535de60f1144e4eea0d027b87017a4b4.zip cpython-a94568a7535de60f1144e4eea0d027b87017a4b4.tar.gz cpython-a94568a7535de60f1144e4eea0d027b87017a4b4.tar.bz2 |
Patch #734231: Update RiscOS support. In particular, correct
riscospath.extsep, and use os.extsep throughout.
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) |