]> git.lyx.org Git - lyx.git/blobdiff - src/support/TempFile.cpp
Configure included iconv with autotools
[lyx.git] / src / support / TempFile.cpp
index 21559e144fe5418d245701dc6520468098ccdd49..6e5a91d6e67b281b71db96eb438736b39d783ec5 100644 (file)
@@ -14,6 +14,7 @@
 
 #include "support/debug.h"
 #include "support/FileName.h"
+#include "support/filetools.h"
 #include "support/Package.h"
 #include "support/qstring_helpers.h"
 
@@ -47,14 +48,16 @@ struct TempFile::Private
 
 TempFile::TempFile(FileName const & temp_dir, string const & mask)
 {
-       QFileInfo tmp_fi(QDir(toqstr(temp_dir.absoluteFilePath())), toqstr(mask));
+       QFileInfo tmp_fi(QDir(toqstr(temp_dir.absoluteFilePath())),
+                        toqstr(onlyFileName(mask)));
        d = new Private(tmp_fi.absoluteFilePath());
 }
 
 
 TempFile::TempFile(string const & mask)
 {
-       QFileInfo tmp_fi(QDir(toqstr(package().temp_dir().absoluteFilePath())), toqstr(mask));
+       QFileInfo tmp_fi(QDir(toqstr(package().temp_dir().absoluteFilePath())),
+                        toqstr(onlyFileName(mask)));
        d = new Private(tmp_fi.absoluteFilePath());
 }