data urls and FileCopyJob

Waldo Bastian bastian at kde.org
Mon Sep 15 11:00:57 BST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 15 September 2003 11:32, David Faure wrote:
> On Monday 15 September 2003 10:04, Waldo Bastian wrote:
> > On Sunday 14 September 2003 23:27, David Faure wrote:
> > > This is a bug in kio_file, it tries to close(fd) even when fd==-1 due
> > > to no data received. Please find the fix below (Waldo - ok?)
> >
> > Strictly speaking kio_file should then create an empty file, no? I mean
> > if I copy a directory from one place to another I don't want to lose
> > empty files without warning.
>
> Right. Ah, I see..... I got an empty file in this case, because KTempFile
> created it. But you're right, we want an empty file even when not using
> KTempFile.
>
> Why does kio_file's put() create the file on demand then? (It only opens
> the dest when receiving the first chunk of data, I don't see why it does
> that).

The put job can get canceled before it gets any data, e.g. because the get job 
couldn't get started, in that case it makes sense not to create any file. 
However, if the put() only gets one empty block of data (which indicates EOD) 
then it should create an empty file.

Cheers,
Waldo
- -- 
bastian at kde.org -=|[ SuSE, The Linux Desktop Experts ]|=- bastian at suse.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE/ZY3ZN4pvrENfboIRAmzrAKCg+GHCWMn+hEij7d78wHquBotyOACcDHUo
RyD7aGe1vSDpWyCL1g/s8NI=
=eeby
-----END PGP SIGNATURE-----




More information about the kfm-devel mailing list