提交 97fb06c0 编写于 作者: D Daniel Imms

Store Uri.toString in backup file content

上级 af3b5fdb
......@@ -155,7 +155,7 @@ export class BackupFileService implements IBackupFileService {
}
if (resource.scheme === 'file') {
content = `${resource.fsPath}\n${content}`;
content = `${resource.toString()}\n${content}`;
}
return this.fileService.updateContent(backupResource, content, BACKUP_FILE_UPDATE_OPTIONS).then(() => model.add(backupResource, versionId));
......
......@@ -108,7 +108,7 @@ suite('BackupFileService', () => {
service.backupResource(fooFile, 'test').then(() => {
assert.equal(fs.readdirSync(path.join(workspaceBackupPath, 'file')).length, 1);
assert.equal(fs.existsSync(fooBackupPath), true);
assert.equal(fs.readFileSync(fooBackupPath), `${fooFile.fsPath}\ntest`);
assert.equal(fs.readFileSync(fooBackupPath), `${fooFile.toString()}\ntest`);
done();
});
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册