All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Kirillov <max@max630.net>
To: Paul Mackerras <paulus@samba.org>
Cc: git@vger.kernel.org, Max Kirillov <max@max630.net>
Subject: [PATCH v5 2/3] gitk: report file saving error
Date: Wed,  4 Mar 2015 05:58:17 +0200	[thread overview]
Message-ID: <1425441498-29416-3-git-send-email-max@max630.net> (raw)
In-Reply-To: <1425441498-29416-1-git-send-email-max@max630.net>

Signed-off-by: Max Kirillov <max@max630.net>
---
 gitk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gitk b/gitk
index 5f09756..9404d5d 100755
--- a/gitk
+++ b/gitk
@@ -2811,7 +2811,7 @@ proc savestuff {w} {
 
     if {$stuffsaved} return
     if {![winfo viewable .]} return
-    catch {
+    if {[catch {
 	if {[file exists $config_file_tmp]} {
 	    file delete -force $config_file_tmp
 	}
@@ -2877,6 +2877,8 @@ proc savestuff {w} {
 	puts $f "}"
 	close $f
 	file rename -force $config_file_tmp $config_file
+    } err]} {
+        puts "Error saving config: $err"
     }
     set stuffsaved 1
 }
-- 
2.1.1.391.g7a54a76

  parent reply	other threads:[~2015-03-04  3:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-04  3:58 [PATCH v5 0/3] gitk: save only changed configuration on exit Max Kirillov
2015-03-04  3:58 ` [PATCH v5 1/3] gitk: write only changed configuration variables Max Kirillov
2015-03-04  3:58 ` Max Kirillov [this message]
2015-03-04  3:58 ` [PATCH v5 3/3] gitk: synchronize config write Max Kirillov
2015-03-22  3:39 ` [PATCH v5 0/3] gitk: save only changed configuration on exit Paul Mackerras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1425441498-29416-3-git-send-email-max@max630.net \
    --to=max@max630.net \
    --cc=git@vger.kernel.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.