Skip to content

Commit

Permalink
Make temp dir in cross-platform way
Browse files Browse the repository at this point in the history
Since tempnam() seems to behave different on Linux and Windows.
  • Loading branch information
arp242 committed Nov 23, 2017
1 parent b796978 commit dd8393b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion autoload/go/debug.vim
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,8 @@ function! go#debug#StartWith(...) abort
" current dir. We pass --wd= so the binary is still run from the current
" dir.
let original_dir = getcwd()
let tmp = fnamemodify(tempname(), ':h')
let pkgname = go#package#FromPath(bufname(''))
let tmp = go#util#tempdir('vim-go-debug-')
exe 'lcd ' . tmp

echohl SpecialKey | echomsg 'Starting GoDebug...' | echohl None
Expand Down
1 change: 0 additions & 1 deletion autoload/go/util.vim
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ function! go#util#archive()
return expand("%:p:gs!\\!/!") . "\n" . strlen(l:buffer) . "\n" . l:buffer
endfunction


" Make a named temporary directory which starts with "prefix".
"
" Unfortunately Vim's tempname() is not portable enough across various systems;
Expand Down

0 comments on commit dd8393b

Please sign in to comment.