All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Borzenkov <snaury@gmail.com>
To: Alex Riesen <raa.lkml@gmail.com>
Cc: Pat Thoyts <patthoyts@users.sourceforge.net>,
	git@vger.kernel.org, Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH 1/2] Work around leftover temporary save file.
Date: Tue, 15 Sep 2009 18:14:48 +0400	[thread overview]
Message-ID: <e2480c70909150714n3b7d6018rcb5bcb42d1d78218@mail.gmail.com> (raw)
In-Reply-To: <81b0412b0909150601j74d40181pc2308f4f63b4817e@mail.gmail.com>

On Tue, Sep 15, 2009 at 5:01 PM, Alex Riesen <raa.lkml@gmail.com> wrote:
> On Tue, Sep 15, 2009 at 11:26, Pat Thoyts
> <patthoyts@users.sourceforge.net> wrote:
>>
>> If a file exists and is hidden on Windows the Tcl open command will
>> fail as the attributes provided in the CREAT call fail to match those
>> of the existing file. Forcing removal of the temporary file before we
>> begin solves any problems caused by previous failures to save the
>> application settings. An alternative would be to remove the hidden
>> attribute before calling 'open'.
>>
>> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
>> ---
>>  gitk |    1 +
>>  1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/gitk b/gitk
>> index 1306178..a0214b7 100755
>> --- 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}
>
> maybe another gitk instance is writing it at exactly same moment
> in time? Writing is known to take a few moments. Especially on Windows.

Then deleting would fail, because on Windows opened files cannot be
deleted (unless they are opened in a special way that permits it).

  reply	other threads:[~2009-09-15 14:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-08 19:22 [PATCH] gitk: restore wm state to normal before saving geometry information Alexey Borzenkov
2009-09-15  9:26 ` [PATCH 1/2] Work around leftover temporary save file Pat Thoyts
2009-09-15 13:01   ` Alex Riesen
2009-09-15 14:14     ` Alexey Borzenkov [this message]
2009-09-15 15:44       ` Pat Thoyts
2009-09-15 14:47     ` Pat Thoyts
2009-09-15  9:37 ` [PATCH 2/2] Fix the geometry when restoring from zoomed state Pat Thoyts
2009-09-15 14:11   ` Alexey Borzenkov
2009-09-17 12:15   ` [PATCH 2/2] gitk: " Paul Mackerras
2009-09-17 13:04     ` Alexey Borzenkov
2009-09-18 13:24     ` Pat Thoyts
2009-09-15 12:03 ` [PATCH] gitk: restore wm state to normal before saving geometry information Pat Thoyts
2009-09-15 12:54   ` Alexey Borzenkov
2009-09-15 13:58     ` Alexey Borzenkov
2009-09-16 10:21 ` Paul Mackerras
2009-09-16 21:07   ` Pat Thoyts

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=e2480c70909150714n3b7d6018rcb5bcb42d1d78218@mail.gmail.com \
    --to=snaury@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=patthoyts@users.sourceforge.net \
    --cc=paulus@samba.org \
    --cc=raa.lkml@gmail.com \
    /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.