]> git.lyx.org Git - features.git/commitdiff
Increase the uniqueness of the temp directories
authorVincent van Ravesteijn <vfr@lyx.org>
Sun, 19 May 2013 12:07:14 +0000 (14:07 +0200)
committerVincent van Ravesteijn <vfr@lyx.org>
Sun, 19 May 2013 12:09:06 +0000 (14:09 +0200)
Now, the temporary directories are composed of the PID + 8 random
characters. This used to be the PID + 2 random characters.

See also 327f7ed90dbcaad92511b962a8d1d14b46ef552a.

src/support/FileName.cpp

index fa8cdac73f3b3634258652b4e2445d780def6e83..f0489309d549ae44a61df42c888225eb23eadfe5 100644 (file)
@@ -443,7 +443,7 @@ static string createTempFile(QString const & mask)
        //        same file again. To make this safe the QTemporaryFile object
        //        needs to be kept for the whole life time of the temp file name.
        //        This can be achieved by using the TempFile class.
-       QTemporaryFile qt_tmp(mask);
+       QTemporaryFile qt_tmp(mask + ".XXXXXXXXXXXX");
        if (qt_tmp.open()) {
                string const temp_file = fromqstr(qt_tmp.fileName());
                LYXERR(Debug::FILES, "Temporary file `" << temp_file << "' created.");