DBRTools - Need to restore the current working directory.
authorMattD <mattd@symbian.org>
Mon, 15 Mar 2010 19:45:11 +0000
changeset 201 4e09c8ccae86
parent 200 12422144aae1
child 202 f6ae410bd493
DBRTools - Need to restore the current working directory.
dbrtools/dbr/dbrutils.py
--- a/dbrtools/dbr/dbrutils.py	Mon Mar 15 16:57:00 2010 +0000
+++ b/dbrtools/dbr/dbrutils.py	Mon Mar 15 19:45:11 2010 +0000
@@ -74,6 +74,7 @@
 def extractfromzip(files, name, location):
     tmpfilename = os.tmpnam( )
     print tmpfilename
+    cwd = os.getcwd();
     os.chdir(os.path.join(epocroot(),location))
     f = open(tmpfilename,'w')
     for file in sorted(files):
@@ -85,6 +86,7 @@
     print 'executing: >%s<\n' %exestr
     os.system(exestr)
     os.unlink(tmpfilename)
+    os.chdir(cwd)
 
 def deletefiles(files):
     os.chdir(epocroot())