forked from PAWPAW-Mirror/lib_xua
Make sure dir is off cwd
This commit is contained in:
@@ -21,7 +21,7 @@ def cd(newdir, cleanup=lambda: True):
|
||||
|
||||
@contextlib.contextmanager
|
||||
def tempdir():
|
||||
dirpath = tempfile.mkdtemp()
|
||||
dirpath = tempfile.mkdtemp(dir=os.getcwd())
|
||||
def cleanup():
|
||||
shutil.rmtree(dirpath)
|
||||
with cd(dirpath, cleanup):
|
||||
|
||||
Reference in New Issue
Block a user