summaryrefslogtreecommitdiff
path: root/extension
diff options
context:
space:
mode:
authorOmar Rizwan <omar@omar.website>2021-02-08 04:52:07 -0800
committerOmar Rizwan <omar@omar.website>2021-02-08 04:52:07 -0800
commitb6b61ee09314b05cef42b8f93e516c672fd1d6aa (patch)
treed973cc455ff6cc20e169bac49b89b6c4081a8656 /extension
parent341ae6d477ae79b087d302f7de9ccac33f4bef55 (diff)
downloadTabFS-b6b61ee09314b05cef42b8f93e516c672fd1d6aa.tar.gz
TabFS-b6b61ee09314b05cef42b8f93e516c672fd1d6aa.zip
safari: make tabfs URL path independent
Diffstat (limited to 'extension')
-rw-r--r--extension/safari/TabFS/TabFSService/TabFSService.swift5
1 files changed, 4 insertions, 1 deletions
diff --git a/extension/safari/TabFS/TabFSService/TabFSService.swift b/extension/safari/TabFS/TabFSService/TabFSService.swift
index 80c6051..85b29f3 100644
--- a/extension/safari/TabFS/TabFSService/TabFSService.swift
+++ b/extension/safari/TabFS/TabFSService/TabFSService.swift
@@ -14,8 +14,11 @@ class TabFSService: NSObject, TabFSServiceProtocol {
var fsInput: FileHandle!
var fsOutput: FileHandle!
func startFs() {
+ let fileURL = URL(fileURLWithPath: #filePath)
+ let repoURL = fileURL.deletingLastPathComponent().deletingLastPathComponent().deletingLastPathComponent().deletingLastPathComponent().deletingLastPathComponent()
+
fs = Process()
- fs.executableURL = URL(fileURLWithPath: "/Users/osnr/Code/tabfs/fs/tabfs")
+ fs.executableURL = repoURL.appendingPathComponent("fs").appendingPathComponent("tabfs")
fs.currentDirectoryURL = fs.executableURL?.deletingLastPathComponent()
fs.arguments = []