]> git.lyx.org Git - lyx.git/blobdiff - src/support/filetools.cpp
Fix layout bug. Pasting text into a cell tried to set Standard layout, because
[lyx.git] / src / support / filetools.cpp
index aa9d99da0edcc0200452e712a02702cd8bbbbfd3..b2a11aba10c41ad5d6e9748deb3545c7b61f13ac 100644 (file)
@@ -321,16 +321,10 @@ static FileName createTmpDir(FileName const & tempdir, string const & mask)
        LYXERR(Debug::FILES, "createTmpDir: tempdir=`" << tempdir << "'\n"
                << "createTmpDir:    mask=`" << mask << '\'');
 
-       string const tmp_dir = tempdir.absFilename() + "/" + mask;
-       FileName const tmpfl = FileName::tempName(tmp_dir);
-       // FileName::tempName actually creates a file to make sure that it
-       // stays unique. So we have to delete it before we can create
-       // a dir with the same name. Note also that we are not thread
-       // safe because of the gap between unlink and mkdir. (Lgb)
-       tmpfl.removeFile();
+       FileName const tmpfl = FileName::tempName(tempdir, mask);
 
        if (tmpfl.empty() || !tmpfl.createDirectory(0700)) {
-               LYXERR0("LyX could not create the temporary directory '" << tmp_dir
+               LYXERR0("LyX could not create temporary directory in " << tempdir
                        << "'");
                return FileName();
        }