Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions app/pencil-core/common/config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
const { app } = require("@electron/remote");

var Config = {
};

Config.data = {};
Config.DATA_DIR_NAME = ".pencil";
Config.STENCILS_DIR_NAME = "stencils";
Config.PRIVATE_STENCILS_DIR_NAME = "privateCollection";
Config.CONFIG_FILE_NAME = "config.json";

Config.getDataPath = function () {
return path.join(os.homedir(), Config.DATA_DIR_NAME);
const homeDataDir = path.join(os.homedir(), ".pencil");
if (fs.existsSync(homeDataDir)) {
return homeDataDir;
}
return app.getPath("userData");
};

Config.getDataFilePath = function (name) {
Expand Down