diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-08 22:42:23 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-08 22:42:23 +1000 |
| commit | 66c012300a28a97f959808ed2e0f968c1e3601c0 (patch) | |
| tree | 2c730b19d3898b9587022b3cf6c797eeb7ffde2b /utils | |
| parent | internal: fix more colours (diff) | |
| download | caelestia-shell-66c012300a28a97f959808ed2e0f968c1e3601c0.tar.gz caelestia-shell-66c012300a28a97f959808ed2e0f968c1e3601c0.tar.bz2 caelestia-shell-66c012300a28a97f959808ed2e0f968c1e3601c0.zip | |
paths: better to string
Diffstat (limited to 'utils')
| -rw-r--r-- | utils/Paths.qml | 7 |
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 { |