Skip to content

Commit

Permalink
fix bug when user set default path as D: rather than D:/
Browse files Browse the repository at this point in the history
  • Loading branch information
liweitian committed Nov 25, 2019
1 parent 865e790 commit 88aacb5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Composer/packages/server/src/store/data.template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import fs from 'fs';
import { Path } from '../utility/path';

let defaultPath = process.env.DEFAULT_PATH;
if (defaultPath && defaultPath.endsWith(':')) {
defaultPath = defaultPath + '/';
}
if (!defaultPath) {
console.log(`The default path is set to ${Path.join(os.homedir(), 'Documents', 'Composer')}`);
defaultPath = Path.join(os.homedir(), 'Documents', 'Composer');
Expand Down

0 comments on commit 88aacb5

Please sign in to comment.