提交 e9c830a5 编写于 作者: B Benjamin Pasero

log - less spam on startup when files do not exist

上级 69fd0ddc
......@@ -69,7 +69,9 @@ export class FileStorage {
try {
return JSON.parse(fs.readFileSync(this.dbPath).toString()); // invalid JSON or permission issue can happen here
} catch (error) {
this.onError(error);
if (error && error.code !== 'ENOENT') {
this.onError(error);
}
return {};
}
......
......@@ -271,7 +271,9 @@ export class WorkspacesMainService implements IWorkspacesMainService {
try {
untitledWorkspacePaths = readdirSync(this.workspacesHome).map(folder => join(this.workspacesHome, folder, UNTITLED_WORKSPACE_NAME));
} catch (error) {
this.logService.warn(`Unable to read folders in ${this.workspacesHome} (${error}).`);
if (error && error.code !== 'ENOENT') {
this.logService.warn(`Unable to read folders in ${this.workspacesHome} (${error}).`);
}
}
const untitledWorkspaces: IWorkspaceIdentifier[] = coalesce(untitledWorkspacePaths.map(untitledWorkspacePath => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册