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

textfiles - add comment

上级 27713ada
......@@ -283,9 +283,13 @@ export abstract class AbstractTextFileService extends Disposable implements ITex
// before event
await this._onWillRunOperation.fireAsync({ operation: FileOperation.DELETE, target: resource }, CancellationToken.None);
// Check for any existing dirty file model for the resource
// and do a soft revert before deleting to be able to close
// any opened editor with these files
const dirtyFiles = this.getDirtyFileModels().map(dirtyFileModel => dirtyFileModel.resource).filter(dirty => isEqualOrParent(dirty, resource));
await this.doRevertFiles(dirtyFiles, { soft: true });
// Now actually delete from disk
await this.fileService.del(resource, options);
// after event
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册