summaryrefslogtreecommitdiff
path: root/utils/Paths.qml
diff options
context:
space:
mode:
Diffstat (limited to 'utils/Paths.qml')
-rw-r--r--utils/Paths.qml7
1 files changed, 6 insertions, 1 deletions
diff --git a/utils/Paths.qml b/utils/Paths.qml
index 0e3ac3b..87d5a48 100644
--- a/utils/Paths.qml
+++ b/utils/Paths.qml
@@ -17,7 +17,12 @@ Singleton {
readonly property url imagecache: `${cache}/imagecache`
function stringify(path: url): string {
- return path.toString().replace(/%20/g, " ");
+ let str = path.toString();
+ if (str.startsWith("root:/"))
+ str = `file://${Quickshell.shellDir}/${str.slice(6)}`;
+ else if (str.startsWith("/"))
+ str = `file://${str}`;
+ return new URL(str).pathname;
}
function expandTilde(path: string): string {