Skip to content

Commit

Permalink
fix: create rnc dir if missing
Browse files Browse the repository at this point in the history
  • Loading branch information
NGPixel committed Mar 11, 2024
1 parent 3adb05b commit 2171dc9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src-electron/lsp.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ export default {

// Download RNC files
const schemasUrlBase = 'https://github.com/ietf-tools/rfcxml-templates-and-schemas/raw/main/'
const schemasPathBase = path.join(app.getPath('appData'), app.name, 'rnc/')
const schemasPathBase = path.join(app.getPath('appData'), app.name, 'rnc')
try {
await fs.mkdir(schemasPathBase)
await fs.access(path.join(schemasPathBase, 'rfc7991bis.rnc'), fs.constants.R_OK)
await fs.access(path.join(schemasPathBase, 'SVG-1.2-RFC.rnc'), fs.constants.R_OK)
} catch (err) {
Expand Down Expand Up @@ -258,7 +259,6 @@ export default {

// -> Send initialization sequence
try {
console.info(path.join(app.getPath('appData'), app.name, 'rnc/rfc7991bis.rnc'))
const initResult = await this.sendRequest('initialize', makeInitConfig({
fileAssociations: [
{
Expand Down

0 comments on commit 2171dc9

Please sign in to comment.