safari: make tabfs URL path independent

This commit is contained in:
Omar Rizwan 2021-02-08 04:52:07 -08:00
parent 341ae6d477
commit b6b61ee093
1 changed files with 4 additions and 1 deletions

View File

@ -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 = []