Skip to content

Commit

Permalink
if you will hide file '.python-version' then CreateTextFile fail with…
Browse files Browse the repository at this point in the history
… error 'Permission Denied'. This changes fix this error
  • Loading branch information
Ivan Vigilov committed Aug 15, 2019
1 parent b2e21ad commit 4881a5a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pyenv-win/libexec/pyenv.vbs
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,11 @@ Sub CommandLocal(arg)
GetBinDir(ver)
End If
Dim ofile
Set ofile = objfs.CreateTextFile( strCurrent & strVerFile , True )
If objfs.FileExists(strCurrent & strVerFile) Then
Set ofile = objfs.OpenTextFile ( strCurrent & strVerFile , 2 )
Else
Set ofile = objfs.CreateTextFile( strCurrent & strVerFile , True )
End If
ofile.WriteLine(ver)
ofile.Close()
End If
Expand Down

0 comments on commit 4881a5a

Please sign in to comment.