Skip to content

Commit df15491

Browse files
authored
Fix empty hotkeys field in shortcut file props
1 parent c755333 commit df15491

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/windows.vbs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ sub createFile()
3232
objLink.WorkingDirectory = strCwd
3333
objLink.IconLocation = strIcon
3434
objLink.WindowStyle = strWindowMode
35-
objLink.Hotkey = strHotkey
35+
' We must skip setting the hotkey if the trimmed value is an empty string to avoid errors (#96).
36+
If Trim(strHotkey) <> "" Then
37+
objLink.Hotkey = strHotkey
38+
End If
3639
objLink.Save
3740
end sub
3841

0 commit comments

Comments
 (0)