make configs dir if it doesn't exist

modals
Kit Kasune 3 years ago
parent 372147a9f8
commit 7e9b729a33
  1. 1
      scripts/contextmenu/pin.js

@ -6,6 +6,7 @@ const refresh = require('../fileview/refresh');
const newToast = require("../toast/createtoast"); const newToast = require("../toast/createtoast");
module.exports = () => { module.exports = () => {
if (!fs.existsSync(path.join(__dirname, '../../', '/json/config'))) {fs.mkdirSync(path.join(__dirname, '../../', '/json/config'));}
let pins; let pins;
if (fs.existsSync(path.join(__dirname, '../../', '/json/config/favorites.json'))) { if (fs.existsSync(path.join(__dirname, '../../', '/json/config/favorites.json'))) {
pins = require('../../json/config/favorites.json'); pins = require('../../json/config/favorites.json');

Loading…
Cancel
Save