提交 bc1a048e 编写于 作者: I isidor

explorer: better root dnd

fixes #35032
上级 17a5c2f4
......@@ -661,10 +661,6 @@ export class FileDragAndDrop extends SimpleFileResourceDragAndDrop {
}
private statToResource(stat: FileStat): URI {
if (stat.isRoot) {
return null; // Can not move root folder
}
if (stat.isDirectory) {
return URI.from({ scheme: 'folder', path: stat.resource.path }); // indicates that we are dragging a folder
}
......@@ -746,6 +742,10 @@ export class FileDragAndDrop extends SimpleFileResourceDragAndDrop {
return true; // NewStatPlaceholders can not be moved
}
if (source.isRoot) {
return true; // Root folder can not be moved
}
if (source.resource.toString() === target.resource.toString()) {
return true; // Can not move anything onto itself
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册