Skip to content

Commit

Permalink
fix(windows): config file created correctly on windows (#1115)
Browse files Browse the repository at this point in the history
  • Loading branch information
sr258 authored Jan 4, 2021
1 parent f9d02a0 commit f3113e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion server/src/boot/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default async function setup(

// we might need to update settings here and run upgrade scripts when for example the baseUrl changes

if (!(await fsExtra.existsSync(serverConfig.configFile))) {
if (!fsExtra.existsSync(serverConfig.configFile)) {
fsExtra.writeFileSync(
serverConfig.configFile,
JSON.stringify({
Expand Down
11 changes: 6 additions & 5 deletions server/src/serverConfig.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import path from 'path';
import IServerConfig from './IServerConfig';

export default (userData: string): IServerConfig => {
return {
librariesPath: `${userData}/libraries`,
cache: `${userData}/store.json`,
temporaryStoragePath: `${userData}/tmp`,
workingCachePath: `${userData}/workingCache`,
configFile: `${userData}/config.json`
librariesPath: path.join(userData, 'libraries'),
cache: path.join(userData, 'store.json'),
temporaryStoragePath: path.join(userData, 'tmp'),
workingCachePath: path.join(userData, 'workingCache'),
configFile: path.join(userData, 'config.json')
};
};

0 comments on commit f3113e0

Please sign in to comment.