Ensuring the temp dir exists before returning it
This commit is contained in:
parent
f0c9878f87
commit
1bba4a38cc
@ -38,7 +38,10 @@ def ToUtf8IfNeeded( string_or_unicode ):
|
||||
|
||||
|
||||
def PathToTempDir():
|
||||
return os.path.join( tempfile.gettempdir(), 'ycm_temp' )
|
||||
tempdir = os.path.join( tempfile.gettempdir(), 'ycm_temp' )
|
||||
if not os.path.exists( tempdir ):
|
||||
os.makedirs( tempdir )
|
||||
return tempdir
|
||||
|
||||
|
||||
# From here: http://stackoverflow.com/a/8536476/1672783
|
||||
|
Loading…
x
Reference in New Issue
Block a user