From 8c11d5598ec48a3f099f64f340b60469a4e14a31 Mon Sep 17 00:00:00 2001 From: ced <> Date: Thu, 6 Sep 2007 14:12:38 +0000 Subject: [PATCH] Fix open zipfile on win32 bzr revid: ced-5995f1cfb813d1bb27b1b7d047a7de60c423b1db --- bin/tools/misc.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/tools/misc.py b/bin/tools/misc.py index c28a56f2d10..e4b2843662f 100644 --- a/bin/tools/misc.py +++ b/bin/tools/misc.py @@ -192,7 +192,9 @@ def file_open(name, mode="r", subdir='addons'): if zipfile.is_zipfile(head+'.zip'): import StringIO zfile = zipfile.ZipFile(head+'.zip') - return StringIO.StringIO(zfile.read(os.path.join(os.path.basename(head), zipname))) + return StringIO.StringIO(zfile.read(os.path.join( + os.path.basename(head), zipname).replace( + os.sep, '/'))) if os.path.isfile(name): return file(name, mode)