diff --git a/src/libs/qmljs/qmljsdocument.cpp b/src/libs/qmljs/qmljsdocument.cpp
index 6ccbf532d054524e52bfb938fb7aef12b270d915..de18b8328d615bf6cf81d16b6c00d2d7745ca289 100644
--- a/src/libs/qmljs/qmljsdocument.cpp
+++ b/src/libs/qmljs/qmljsdocument.cpp
@@ -47,10 +47,10 @@ Document::Document(const QString &fileName)
     , _isQmlDocument(false)
     , _documentRevision(0)
     , _parsedCorrectly(false)
+    , _fileName(fileName)
 {
     QFileInfo fileInfo(fileName);
-    _path = fileInfo.canonicalPath();
-    _fileName = fileInfo.canonicalFilePath();
+    _path = fileInfo.absolutePath();
 
     // ### Should use mime type
     if (fileInfo.suffix() == QLatin1String("qml")