diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index 960a1700b..797994915 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -4209,11 +4209,11 @@ bool MainWindow::LoadPattern(QString fileName, const QString& customMeasureFile) { qCDebug(vMainWindow, "Loading new file %s.", qUtf8Printable(fileName)); - { // Convert to absolute path is need + { // Convert to absolute path if need QFileInfo info(fileName); - if (info.isRelative()) + if (info.exists() && info.isRelative()) { - fileName = QDir::currentPath() + QLatin1Char('/') + fileName; + fileName = QFileInfo(QDir::currentPath() + QLatin1Char('/') + fileName).canonicalFilePath(); } }