KTemporaryFile::createLocalFile()
David Faure
faure at kde.org
Wed Jul 4 20:44:11 BST 2007
On Wednesday 04 July 2007, Dominik Haumann wrote:
> 4. as kompare has the option X-KDE-HasTempFileOption it will remove
> the file on application exit
Note that this flag only means "it has the --tempfile option".
Whether or not kompare deletes the file depends on whether or not you call it with --tempfile,
i.e. which value you pass to the boolean "tempfile" argument of KRun::runUrl().
If you don't want it to delete the file, don't pass true :)
But this wasn't what the question was about, I just wanted to point that if the deletion
by the app is a problem, then it's easy to solve. Much better than getting a temp filename
and closing the file, which effectively opens it up to symlink attacks (why do you think the
KTemporaryFile API makes it difficult to do this? ;)
> K/QTemporaryFile does not provide this functionality directly
On purpose.
--
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
mailing list