Commit 1aa110ba authored by Ronan's avatar Ronan
Browse files

fix(ui/modules/Common/Form/DroppableTextArea): use `getPathFromUri`

parent 0d526abd
......@@ -5,6 +5,8 @@ import QtQuick.Dialogs 1.2
import Common 1.0
import Common.Styles 1.0
import Utils 1.0
// =============================================================================
Item {
......@@ -26,10 +28,8 @@ Item {
function _emitFiles (files) {
// Filtering files, other urls are forbidden.
files = files.reduce(function (files, file) {
var result = file.match(/^file:\/\/(.*)/)
if (result) {
files.push(result[1])
if (file.startsWith('file:') {
files.push(Utils.getPathFromUri(file))
}
return files
......
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