Commit f5e0dc40 authored by con's avatar con
Browse files

Fixes: Notification about externally modified files on Windows.

Reviewed-by: dt
Reviewed-by: Friedemann Kleint
parent f8db7aca
...@@ -361,12 +361,15 @@ void FileManager::checkForNewFileName() ...@@ -361,12 +361,15 @@ void FileManager::checkForNewFileName()
QString FileManager::fixFileName(const QString &fileName) QString FileManager::fixFileName(const QString &fileName)
{ {
QString s = fileName; QString s = fileName;
QFileInfo fi(s);
if (!fi.exists())
s = QDir::toNativeSeparators(s);
else
s = QDir::toNativeSeparators(fi.canonicalFilePath());
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
s = s.toLower(); s = s.toLower();
#endif #endif
if (!QFile::exists(s)) return s;
return QDir::toNativeSeparators(s);
return QFileInfo(QDir::toNativeSeparators(s)).canonicalFilePath();
} }
/*! /*!
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment