[Qt-interest] How to wait <N> ms for file creation/deletion to succeed?
Stephan Rose
kermos at somrek.net
Tue Dec 30 01:04:11 CET 2008
On Mon, 2008-12-29 at 23:16 +0100, Arnold Krille wrote:
> On Monday 29 December 2008 20:49:03 Stephan Rose wrote:
> > If you were to create a temporary file that is an image and the happen
> > to have the same directory open in explorer, when the file is created
> > explorer will go and thumbnail it. If at that same moment the app tries
> > to move the file it will fail due the fact that the file is currently
> > being accessed by explorer.
>
> I don't really know how broken the ms-filesystem is but on linux this is not a
> problem as the file stays present on disk until the last app closes it (in this
> case the thumbnail creator) but is inaccessible for new apps because the files
> reference is deleted from the directory tree. Afaik thats how it works on
> linux unless you "shred" a file (which is just an overwrite with random numbers
> before deleting it the standard-way).
> And as thumbnail generators are also watching directories for changes, they
> will notice when a file gets deleted and recreated.
Under linux yep.
Under windows, well let me put it this way. I've had similar issues as
the original poster has had with other applications. I've had to go so
far as to restart the computer and boot into linux to delete a file
because the moment I'd look at it in explorer it'd lock it to try and
create a thumbnail and wouldn't release the lock.
That's how broken the MS file system is.
Stephan
More information about the Qt-interest-old
mailing list