Skip to content

Commit

Permalink
Merge pull request #2 from p292/patch-1
Browse files Browse the repository at this point in the history
Update template.txt
  • Loading branch information
alexplaskett committed Jan 17, 2017
2 parents e5230bb + e50047d commit 2a53408
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion template.txt
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,12 @@ Dim allPaths() As String
allPaths = Split(paths, ";")
Dim Path As Variant
For Each Path In allPaths
ms = Path & "\" & program
' With more complex env variables - esp complex path set - need to do some tidying or quote errors
If Right(Path, 1) = Chr(34) Then 'Check if string ends with a quote
ms = Mid(Path, 2, Len(Path) - 2) & "\" & program
Else
ms = Path & "\" & program
End If
If Not Dir(ms, vbDirectory) = vbNullString Then
pathOf = ms
Exit Function
Expand Down

0 comments on commit 2a53408

Please sign in to comment.