summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgitk4
1 files changed, 3 insertions, 1 deletions
diff --git a/gitk b/gitk
index 41e5071c4b..9237830328 100755
--- a/gitk
+++ b/gitk
@@ -3504,7 +3504,9 @@ proc gitknewtmpdir {} {
set tmpdir $gitdir
}
set gitktmpformat [file join $tmpdir ".gitk-tmp.XXXXXX"]
- set gitktmpdir [exec mktemp -d $gitktmpformat]
+ if {[catch {set gitktmpdir [exec mktemp -d $gitktmpformat]}]} {
+ set gitktmpdir [file join $gitdir [format ".gitk-tmp.%s" [pid]]]
+ }
if {[catch {file mkdir $gitktmpdir} err]} {
error_popup "[mc "Error creating temporary directory %s:" $gitktmpdir] $err"
unset gitktmpdir