summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/Paths.qml16
1 files changed, 7 insertions, 9 deletions
diff --git a/utils/Paths.qml b/utils/Paths.qml
index bd57608..cc8c712 100644
--- a/utils/Paths.qml
+++ b/utils/Paths.qml
@@ -1,7 +1,6 @@
pragma Singleton
import Quickshell
-import Quickshell.Io
import Qt.labs.platform
Singleton {
@@ -17,16 +16,15 @@ Singleton {
readonly property url imagecache: `${cache}/imagecache`
- function mkdir(path: url): void {
- mkdirProc.path = path.toString().replace("file://", "");
- mkdirProc.startDetached();
+ function strip(path: url): string {
+ return path.toString().replace("file://", "");
}
- Process {
- id: mkdirProc
-
- property string path
+ function mkdir(path: url): void {
+ Quickshell.execDetached(["mkdir", "-p", strip(path)]);
+ }
- command: ["mkdir", "-p", path]
+ function copy(from: url, to: url): void {
+ Quickshell.execDetached(["cp", strip(from), strip(to)]);
}
}