提交 69de6464 编写于 作者: I isidor

explorer: pass the folder flag when deleting directories

上级 fe65b264
......@@ -164,7 +164,7 @@ class DeleteOperation implements IFileOperation {
}
let contents: VSBuffer | undefined;
if (!this._undoesCreateOperation) {
if (!this._undoesCreateOperation && !this.options.folder) {
try {
contents = (await this._fileService.readFile(this.oldUri)).value;
} catch (err) {
......
......@@ -226,7 +226,7 @@ async function deleteFiles(explorerService: IExplorerService, bulkEditService: I
// Call function
try {
const resourceFileEdits = distinctElements.map(e => new ResourceFileEdit(e.resource, undefined, { recursive: true }));
const resourceFileEdits = distinctElements.map(e => new ResourceFileEdit(e.resource, undefined, { recursive: true, folder: e.isDirectory }));
// TODO@Isidor respect the useTrash parameter
await bulkEditService.apply(resourceFileEdits, {
undoRedoSource: explorerService.undoRedoSource,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册