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

Cannot save deleted file with different case (fix #99650)

上级 a802ca24
......@@ -231,7 +231,9 @@ export abstract class AbstractTextFileService extends Disposable implements ITex
// If the target is different but of same identity, we
// move the source to the target, knowing that the
// underlying file system cannot have both and then save.
if (this.fileService.canHandleResource(source) && this.uriIdentityService.extUri.isEqual(source, target)) {
// However, this will only work if the source exists
// and is not orphaned, so we need to check that too.
if (this.fileService.canHandleResource(source) && this.uriIdentityService.extUri.isEqual(source, target) && (await this.fileService.exists(source))) {
await this.workingCopyFileService.move(source, target);
return this.save(target, options);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册