summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 87b49a5)
raw | patch | inline | side by side (parent: 87b49a5)
author | Shawn O. Pearce <spearce@spearce.org> | |
Thu, 5 Jul 2007 22:39:40 +0000 (18:39 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Fri, 6 Jul 2007 08:02:18 +0000 (04:02 -0400) |
Apparently under some setups on Windows Tk is hiding our file
extension recommendation of ".bat" from the user and that is
allowing the user to create a shortcut file which has no file
extension. Double clicking on such a file in Windows Explorer
brings up the associate file dialog, as Windows does not know
what application to launch.
We now append the file extension ".bat" to the filename of the
shortcut file if it has no extension or if it has one but it is
not ".bat".
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
extension recommendation of ".bat" from the user and that is
allowing the user to create a shortcut file which has no file
extension. Double clicking on such a file in Windows Explorer
brings up the associate file dialog, as Windows does not know
what application to launch.
We now append the file extension ".bat" to the filename of the
shortcut file if it has no extension or if it has one but it is
not ".bat".
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
lib/shortcut.tcl | patch | blob | history |
diff --git a/lib/shortcut.tcl b/lib/shortcut.tcl
index ebf72e44521feac5619842227f61e4e5f26a819a..a0a1b7dddd0eab743fac896316d3410848b703a2 100644 (file)
--- a/lib/shortcut.tcl
+++ b/lib/shortcut.tcl
-title "[appname] ([reponame]): Create Desktop Icon" \
-initialfile "Git [reponame].bat"]
if {$fn != {}} {
+ if {[file extension $fn] ne {.bat}} {
+ set fn ${fn}.bat
+ }
if {[catch {
set fd [open $fn w]
puts $fd "@ECHO Entering [reponame]"
-initialdir $desktop \
-initialfile "Git [reponame].bat"]
if {$fn != {}} {
+ if {[file extension $fn] ne {.bat}} {
+ set fn ${fn}.bat
+ }
if {[catch {
set fd [open $fn w]
set sh [exec cygpath \