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

toBackupPath: only lowercase on win and mac

上级 5c5e51bf
......@@ -6,6 +6,7 @@
import * as fs from 'fs';
import * as path from 'path';
import * as crypto from 'crypto';
import * as platform from 'vs/base/common/platform';
import * as extfs from 'vs/base/node/extfs';
import Uri from 'vs/base/common/uri';
import { IBackupWorkspacesFormat, IBackupMainService } from 'vs/platform/backup/common/backup';
......@@ -135,7 +136,8 @@ export class BackupMainService implements IBackupMainService {
}
protected toBackupPath(workspacePath: string): string {
const workspaceHash = crypto.createHash('md5').update(workspacePath.toLowerCase()).digest('hex');
const caseAwarePath = platform.isWindows || platform.isMacintosh ? workspacePath.toLowerCase() : workspacePath;
const workspaceHash = crypto.createHash('md5').update(caseAwarePath).digest('hex');
return path.join(this.backupHome, workspaceHash);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册