QTemporaryDir sounds like a good idea.

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
???? ??????????
Sent: Mittwoch, 10. August 2011 17:43
To: [email protected]
Subject: Re: [Qt5-feedback] QTemporaryDirectory

Seems to be good idea. Maybe name it QTemporaryDir instead like QDir?

10.08.2011, в 18:02, David Faure написал(а):

Similar to QTemporaryFile, I'm thinking of creating a QTemporaryDirectory
class, for these cases where apps need a temp dir (e.g. to extract a zip, or
write files before zipping them, or for unittests that need many files, like
those testing directory-copy-operations).

Of course one could use QTemporaryFile to get a temp filename, let the
destructor delete it, and then create it as a directory, but AFAIK this is a
bad idea, it creates a time window for a symlink attack (e.g. the attacker
could be notified of the file creation+deletion using inotify).

So, would a merge request for QTemporaryDirectory be a good idea?

--
David Faure, [email protected], http://www.davidfaure.fr Sponsored by Nokia to
work on KDE, incl. Konqueror (http://www.konqueror.org).

_______________________________________________
Qt5-feedback mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback

_______________________________________________
Qt5-feedback mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback

_______________________________________________
Qt5-feedback mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback

Reply via email to