gitk: Work around leftover temporary save file
[gitweb.git] / gitk
diff --git a/gitk b/gitk
index 1306178069f280412432c7e3d3bf3406135de4e5..a0214b7004f141b7c918a5360d85f8f9e2db285c 100755 (executable)
--- a/gitk
+++ b/gitk
@@ -2526,6 +2526,7 @@ proc savestuff {w} {
     if {$stuffsaved} return
     if {![winfo viewable .]} return
     catch {
+       if {[file exists ~/.gitk-new]} {file delete -force ~/.gitk-new}
        set f [open "~/.gitk-new" w]
        if {$::tcl_platform(platform) eq {windows}} {
            file attributes "~/.gitk-new" -hidden true