make sure tmpdir resolvs user dirs (#20486)

* make sure tmpdir resolvs user dirs

fixes #20332
supercedes #20484

* typo fix
This commit is contained in:
Brian Coca 2017-01-25 13:09:36 -05:00 committed by GitHub
commit 10fa2cd0ef
2 changed files with 12 additions and 3 deletions

View file

@ -218,7 +218,12 @@ class ActionBase(with_metaclass(ABCMeta, object)):
tmp_mode = 0o700
cmd = self._connection._shell.mkdtemp(basefile, use_system_tmp, tmp_mode)
if use_system_tmp:
tmpdir = None
else:
tmpdir = self._remote_expand_user(C.DEFAULT_REMOTE_TMP)
cmd = self._connection._shell.mkdtemp(basefile, use_system_tmp, tmp_mode, tmpdir)
result = self._low_level_execute_command(cmd, sudoable=False)
# error handling on this seems a little aggressive?