diff --git a/src-tauri/capabilities/default.json b/src-tauri/capabilities/default.json index c51de40..9fae946 100644 --- a/src-tauri/capabilities/default.json +++ b/src-tauri/capabilities/default.json @@ -37,14 +37,9 @@ "identifier": "shell:allow-execute", "allow": [ { - "name": "chmod+x", + "name": "chmod-walletshield", "cmd": "chmod", - "args": [ - "+x", - { - "validator": "\\S+" - } - ], + "args": ["+x", "walletshield"], "sidecar": false } ] @@ -55,14 +50,7 @@ { "name": "walletshield-listen", "cmd": "walletshield", - "args": [ - "-listen", - ":7070", - "-config", - { - "validator": "\\S+" - } - ], + "args": ["-listen", ":7070", "-config", "client.toml"], "sidecar": false } ] diff --git a/src/App.tsx b/src/App.tsx index c29a6fb..f0795e3 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -166,10 +166,14 @@ function App() { // prepare the walletshield binary for execution //////////////////////////////////////////////////////////////////////// if (platform() === "linux" || platform() === "macos") { - const output = await Command.create("chmod+x", [ - "+x", - fileWalletshield, - ]).execute(); + log.debug(`executing command: chmod +x walletshield`); + const output = await Command.create( + "chmod-walletshield", + ["+x", "walletshield"], + { + cwd: dirNetwork, + }, + ).execute(); if (output.code !== 0) { throw new Error(`Failed to chmod+x walletshield: ${output.stderr}`); } @@ -181,7 +185,7 @@ function App() { setMsgType(() => "info"); setMsg(() => `Starting network client...`); const cmd = "walletshield"; - const args = ["-listen", ":7070", "-config", fileClientCfg]; + const args = ["-listen", ":7070", "-config", "client.toml"]; const command = Command.create("walletshield-listen", args, { cwd: dirNetwork, env: {