From d6b68655a5f2cd1b36c304a8e63564a8f1ee064e Mon Sep 17 00:00:00 2001 From: Pat Thoyts Date: Thu, 13 Oct 2011 10:20:31 +0100 Subject: [PATCH] Fix fetching the temporary folder to use the correct enumeration value. The TemporaryFolder variable is actually uninitialized which results in its value being treated as 0 which means the GetSpecialFolder call returns the Windows directory and this is not usually writable. Fixed by declaring the cirrect value as per the documentation example. Reported-by: Andrew Rollins Reported-by: Fabio Vitale fabio.vitale@envisioning.it> Signed-off-by: Pat Thoyts --- share/WinGit/Git Bash.vbs | 1 + 1 file changed, 1 insertion(+) diff --git a/share/WinGit/Git Bash.vbs b/share/WinGit/Git Bash.vbs index cbd72821..b3764c16 100644 --- a/share/WinGit/Git Bash.vbs +++ b/share/WinGit/Git Bash.vbs @@ -1,6 +1,7 @@ Set fso = CreateObject("Scripting.FileSystemObject") Set shell = CreateObject("WScript.Shell") +Const TemporaryFolder = 2 linkfile = fso.BuildPath(fso.GetSpecialFolder(TemporaryFolder), "Git Bash.lnk") gitdir = fso.GetParentFolderName(WScript.ScriptFullName) -- 2.11.4.GIT