[delphizip] Re: Exclusive file access

  • From: "Petko Kafedjiski" <kafedjiski@xxxxxxxxxxx>
  • To: <delphizip@xxxxxxxxxxxxx>
  • Date: Tue, 24 Sep 2002 12:00:57 +0200

Thank you very much Russell.

I missed one thing: by doing, what you advice (iterating through all
instances), I suspect that other instances run on other machines on the
network can also overwrite the file, am I right?

However, I have an idea and it is to create a temp file for every instance
that opens the archive, so this will fix the problem to a given level.

Regards,
Petko Kafedjiski
Milenix Software Ltd.
http://www.milenix.com

P.S.: I am sorry for my bad english :)

----- Original Message -----
From: "Russell Peters" <russellpeters@xxxxxxxxxxx>
To: <delphizip@xxxxxxxxxxxxx>
Sent: Monday, September 23, 2002 11:58 PM
Subject: [delphizip] Re: Exclusive file access


>
> This would be helped if I can add an AddTemp option (force add/modify to a
> temporary file), other than that the only way that comes to mind is to
make
> a temporary file (for each instance) to work on.
> - Russell Peters
> A late thought - it should be possible to iterate through all instances
> checking ZipBusy and only writing if none busy.
> Hope this helps.
> ----- Original Message -----
> From: "Petko Kafedjiski" <kafedjiski@xxxxxxxxxxx>
> To: <delphizip@xxxxxxxxxxxxx>
> Sent: Tuesday, September 24, 2002 4:15 AM
> Subject: [delphizip] Exclusive file access
>
>
> >
> > Hello to all! I am new to this mail list, so my question may be answered
> > already and I want to appologize, if it is so.
> >
> > I have an application (http://www.milenix.com - MyInfo 2), which uses
> BCBZip
> > ver. 1.6. However there is a problem, because a single file could be
> opened
> > in two instances of the program and then when the user saves the file
> (which
> > is actually an archive with many files within) in one of the instances
and
> > then saves it in the other - there is a mess with the file and sometimes
> > even the all information could be lost.
> >
> > I want to prevent this by gaining exclusive read-write access of the
file,
> > so it could be opened only once. There is no such option in BCBZip, but
is
> > there some way to workaround it?
> >
> > Thank you very much for your time!
> > Petko Kafedjiski
> > Milenix Software Ltd.
> > http://www.milenix.com
> >
> >
>

Other related posts: