diff --git a/src/vs/workbench/services/textfile/common/textFileEditorModelManager.ts b/src/vs/workbench/services/textfile/common/textFileEditorModelManager.ts index 08c509e9a02cf..ec6d4c95742f6 100644 --- a/src/vs/workbench/services/textfile/common/textFileEditorModelManager.ts +++ b/src/vs/workbench/services/textfile/common/textFileEditorModelManager.ts @@ -270,8 +270,8 @@ export class TextFileEditorModelManager extends Disposable implements ITextFileE await Promises.settled(modelsToRestore.map(async modelToRestore => { // From this moment on, only operate on the canonical resource - // to ensure we reduce the chance of opening the same resource - // with different resource forms (e.g. path casing on Windows) + // to fix a potential data loss issue: + // https://github.com/microsoft/vscode/issues/211374 const target = this.uriIdentityService.asCanonicalUri(modelToRestore.target); // restore the model at the target. if we have previous dirty content, we pass it diff --git a/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.ts b/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.ts index eb89d17526425..f445e7d36ddef 100644 --- a/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.ts +++ b/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.ts @@ -412,8 +412,8 @@ export class StoredFileWorkingCopyManager await Promises.settled(workingCopiesToRestore.map(async workingCopyToRestore => { // From this moment on, only operate on the canonical resource - // to ensure we reduce the chance of opening the same resource - // with different resource forms (e.g. path casing on Windows) + // to fix a potential data loss issue: + // https://github.com/microsoft/vscode/issues/211374 const target = this.uriIdentityService.asCanonicalUri(workingCopyToRestore.target); // Restore the working copy at the target. if we have previous dirty content, we pass it