mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 17:41:40 -05:00
Warn if profile is not found.
This commit is contained in:
parent
20efdea685
commit
8951cd0219
2 changed files with 5 additions and 1 deletions
|
@ -198,6 +198,7 @@ export async function guiset(rule: string, option: string) {
|
|||
return
|
||||
}
|
||||
} else profile_dir = config.get("profiledir")
|
||||
if (profile_dir == "") {logger.error("Profile not found."); return}
|
||||
await Native.mkdir(profile_dir + "/chrome", true)
|
||||
let cssstr = (await Native.read(profile_dir + "/chrome/userChrome.css")).content
|
||||
// this will get overwritten as soon as a second command is run.
|
||||
|
|
|
@ -165,7 +165,10 @@ export async function getProfileDir() {
|
|||
if ((await browser.runtime.getPlatformInfo()).os === "mac")
|
||||
hacky_profile_finder =
|
||||
"find ../../../Library/'Application Support'/Firefox/Profiles -maxdepth 2 -name .parentlock"
|
||||
return (await run(hacky_profile_finder)).content
|
||||
let profilecmd = await run(hacky_profile_finder)
|
||||
if (profilecmd.code != 0) {
|
||||
return ""
|
||||
} else return profilecmd.content
|
||||
.split("/")
|
||||
.slice(0, -1)
|
||||
.join("/")
|
||||
|
|
Loading…
Add table
Reference in a new issue