Don't warn when the file being deleted does not really exist.

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
This commit is contained in:
Enrico Forestieri 2007-12-01 00:30:12 +00:00
parent 49d3f19860
commit 022313a644

View 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;