https://bugs.kde.org/show_bug.cgi?id=458400

--- Comment #3 from Alexander Wilms <f.alexander.wi...@gmail.com> ---
I'm trying, but I don't know how to get a relative path from two absolute
paths:
Apparently, the QDir type is not available in QML and in Javascript it's
usually done with a NodeJS module.

    function getDesktopURI(fileURI) {
        var absoluteDesktopURI =
StandardPaths.writableLocation(StandardPaths.DesktopLocation)
//      var relativeURI = absoluteDesktopURI.relativeFilePath(fileURI) <- QDir
method
//      var desktopURI = relativeURI.replace("file://","desktop://")
        console.log(fileURI)
        console.log(absoluteDesktopURI)
//      console.log(relativeURI)

//        var path = require('path') <- NodeJS module
//        console.log(path.relative('/foo/bar/baz', '/foo')) 
        return fileURI
    }

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to