1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-08 05:57:02 +09:00

Separate data path for beta accounts

This commit is contained in:
Andrew Simachev 2022-08-18 14:01:53 +03:00
parent 69733359d7
commit daf1a70e90

View file

@ -75,7 +75,9 @@ class Util {
};
dataPath () {
const version = app.getVersion();
const dataPath = [];
if (process.env.DATA_PATH) {
this.mkDir(process.env.DATA_PATH);
dataPath.push(process.env.DATA_PATH);
@ -83,9 +85,13 @@ class Util {
dataPath.push(userPath);
if (is.development) {
dataPath.push('dev');
} else
if (version.match('beta')) {
dataPath.push('beta');
};
dataPath.push('data');
};
return path.join.apply(null, dataPath);
};