]> git.lyx.org Git - lyx.git/blobdiff - src/support/FileName.cpp
Implement file locking and apply to configure
[lyx.git] / src / support / FileName.cpp
index 74b3c95316150c7ae2f4ca7e07dbacdeac442d62..f0489309d549ae44a61df42c888225eb23eadfe5 100644 (file)
@@ -131,7 +131,7 @@ FileName::FileName(string const & abs_filename)
        : d(abs_filename.empty() ? new Private : new Private(abs_filename))
 {
        //LYXERR(Debug::FILES, "FileName(" << abs_filename << ')');
-       LASSERT(empty() || isAbsolute(d->name), /**/);
+       LATTEST(empty() || isAbsolute(d->name));
 }
 
 
@@ -194,7 +194,7 @@ void FileName::set(string const & name)
        d->fi.setFile(toqstr(name));
        d->name = fromqstr(d->fi.absoluteFilePath());
        //LYXERR(Debug::FILES, "FileName::set(" << name << ')');
-       LASSERT(empty() || isAbsolute(d->name), /**/);
+       LATTEST(empty() || isAbsolute(d->name));
 }
 
 
@@ -206,7 +206,7 @@ void FileName::set(FileName const & rhs, string const & suffix)
                d->fi.setFile(QDir(rhs.d->fi.absoluteFilePath()), toqstr(suffix));
        d->name = fromqstr(d->fi.absoluteFilePath());
        //LYXERR(Debug::FILES, "FileName::set(" << d->name << ')');
-       LASSERT(empty() || isAbsolute(d->name), /**/);
+       LATTEST(empty() || isAbsolute(d->name));
 }
 
 
@@ -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.");