Revert "support: Workaround for tempdir on different mount."
This reverts commit 3d21efd489.
This commit is contained in:
parent
853c56a38b
commit
63632560b6
1 changed files with 1 additions and 13 deletions
|
|
@ -5,21 +5,9 @@ class UserError(Exception):
|
|||
pass
|
||||
|
||||
|
||||
def _temp_dir_is_on_same_mount_point():
|
||||
tempdir_stat = os.stat(tempfile.gettempdir())
|
||||
working_dir_stat = os.stat('.')
|
||||
|
||||
return tempdir_stat.st_dev == working_dir_stat.st_dev
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
def TemporaryDirectory():
|
||||
if _temp_dir_is_on_same_mount_point():
|
||||
dir = None
|
||||
else:
|
||||
dir = '.'
|
||||
|
||||
dir = tempfile.mkdtemp(dir = dir, prefix = '.tmp_')
|
||||
dir = tempfile.mkdtemp()
|
||||
|
||||
try:
|
||||
yield dir
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue