]> git.lyx.org Git - features.git/commitdiff
Don't warn when the file being deleted does not really exist.
authorEnrico Forestieri <forenr@lyx.org>
Sat, 1 Dec 2007 00:30:12 +0000 (00:30 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Sat, 1 Dec 2007 00:30:12 +0000 (00:30 +0000)
This happens when opening the External Material dialog, where
a temporary filename is generated but the corresponding file
is not yet created.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21893 a592a061-630c-0410-9148-cb99ea01b6c8

src/support/FileName.cpp

index 67a9b8579a074b74c168f3e922d33de02904ba73..436501fe706a33d688664c971cdbc8580d1ec35a 100644 (file)
@@ -262,7 +262,7 @@ unsigned long FileName::checksum() const
 bool FileName::removeFile() const
 {
        bool const success = QFile::remove(d->fi.absoluteFilePath());
-       if (!success)
+       if (!success && exists())
                lyxerr << "FileName::removeFile(): Could not delete file "
                        << *this << "." << endl;
        return success;