Add bufferPath to config, support bufferPath symlink (#27)

* Add bufferPath to config, support bufferPath symlink

* defaultPath before checking realpath

* Move code for retrieving buffer path into its own file

* Do the realpathSync() call for the whole final file path, to allow the buffer file to be a symlink

---------

Co-authored-by: Jonatan Heyman <jonatan@heyman.info>
This commit is contained in:
Joshua Blum
2023-12-23 05:17:13 -05:00
committed by GitHub
parent d1ea17c197
commit f532c7939b
4 changed files with 32 additions and 7 deletions

View File

@@ -28,6 +28,7 @@ const schema = {
"allowBetaVersions": {type: "boolean", default: false},
"enableGlobalHotkey": {type: "boolean", default: false},
"globalHotkey": {type: "string", default: "CmdOrCtrl+Shift+H"},
"bufferPath" : {type: "string", default: ""},
},
},
@@ -51,6 +52,7 @@ const defaults = {
allowBetaVersions: false,
enableGlobalHotkey: false,
globalHotkey: "CmdOrCtrl+Shift+H",
bufferPath: "",
},
theme: "system",
}