diff --git a/src/handlers/xdgurl.cpp b/src/handlers/xdgurl.cpp
index b245a3b8a2f6c3be73a518d8e864242db27b972f..0e2efa2eb57a5899f8a641bb7eeb37d4aba6aa04 100644
--- a/src/handlers/xdgurl.cpp
+++ b/src/handlers/xdgurl.cpp
@@ -136,7 +136,8 @@ void XdgUrl::_saveDownloadedFile(QNetworkReply *reply)
         return;
     }
 
-    QString destination = _destinations[_metadata["type"].toString()].toString();
+    QString type = _metadata["type"].toString();
+    QString destination = _destinations[type].toString();
     QString path = destination + "/" + _metadata["filename"].toString();
 
     Utility::File::makeDir(destination);
@@ -150,6 +151,7 @@ void XdgUrl::_saveDownloadedFile(QNetworkReply *reply)
 
     result["success"] = QString("download_success");
     result["destination"] = destination;
+    result["path"] = path;
     emit finished(Utility::Json::convertObjToStr(result));
 }