io-slave & progress dialog
faure at kde.org
Wed May 19 09:33:40 BST 2004
On Wednesday 19 May 2004 10:24, Craig Drummond wrote:
> Im having a problem with the fonts-ioslave and the progress dialog (i.e.
> the one konqueror pops up when copying files).
> When copying lots of fonts (which are over 32k each in size), the
> progressbar does not update the size correctly it seems to only register
> the 1st 32k per file. Which has the effect of the progress dialog only ever
> getting to around 10% before it closes - and sometimes it seems to tay open,
> even though the number of files copied is complete. The fonts are all copied
> and installed fine its just the progess dialog which is wrong.
> Looking at the code for the put() function in both
> kdelibs/kioslave/file/file.cc and
> kdebase/kcontrol/kfontinst/kio/KioFonts.cpp I cant see anything obviously
Well I see that ::copy() has two cases - nonRootSys and !nonRootSys,
and only the 2nd one emits progress information...
We're talking about copy, not put, if you're copying file from the local system, right?
Otherwise print out debug output from kio (processedSize and totalSize values), to see what the problem is.
I wonder if this kind of code (run as root!) is very secure BTW...
cmd+=("cp -f "); // "kfontinst install ");
cmd+="; chmod 0644 ";
What if destOrigC contains a space?? Or a semicolon?
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel