@lvce-editor/explorer-view 2.48.0 → 2.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/explorerViewWorkerMain.js +12 -11
- package/package.json +1 -1
|
@@ -868,10 +868,10 @@ const WebWorkerRpcClient = {
|
|
|
868
868
|
create: create$3
|
|
869
869
|
};
|
|
870
870
|
|
|
871
|
-
const CreateFolder$1 =
|
|
872
|
-
const CreateFile$1 =
|
|
873
|
-
const Copy$2 =
|
|
874
|
-
const Rename$2 =
|
|
871
|
+
const CreateFolder$1 = 1;
|
|
872
|
+
const CreateFile$1 = 2;
|
|
873
|
+
const Copy$2 = 3;
|
|
874
|
+
const Rename$2 = 4;
|
|
875
875
|
|
|
876
876
|
const rpcs = Object.create(null);
|
|
877
877
|
const set$b = (id, rpc) => {
|
|
@@ -993,7 +993,7 @@ const getBaseName = (pathSeparator, path) => {
|
|
|
993
993
|
return path.slice(path.lastIndexOf(pathSeparator) + 1);
|
|
994
994
|
};
|
|
995
995
|
const join2 = (path, childPath) => {
|
|
996
|
-
if (path.endsWith('/')) {
|
|
996
|
+
if (path.endsWith('/') || childPath.startsWith('/')) {
|
|
997
997
|
return `${path}${childPath}`;
|
|
998
998
|
}
|
|
999
999
|
return `${path}/${childPath}`;
|
|
@@ -1077,16 +1077,17 @@ const EditingFile = File + DELTA_EDITING;
|
|
|
1077
1077
|
const EditingFolder = Directory + DELTA_EDITING;
|
|
1078
1078
|
const EditingDirectoryExpanded = DirectoryExpanded + DELTA_EDITING;
|
|
1079
1079
|
|
|
1080
|
-
const
|
|
1080
|
+
const getSimpleIconRequestType = direntType => {
|
|
1081
1081
|
if (direntType === Directory || direntType === DirectoryExpanded || direntType === EditingDirectoryExpanded || direntType === EditingFolder) {
|
|
1082
1082
|
return 2;
|
|
1083
1083
|
}
|
|
1084
1084
|
return 1;
|
|
1085
1085
|
};
|
|
1086
|
+
|
|
1086
1087
|
const toSimpleIconRequest = request => {
|
|
1087
1088
|
return {
|
|
1088
1089
|
name: request.name,
|
|
1089
|
-
type:
|
|
1090
|
+
type: getSimpleIconRequestType(request.type)
|
|
1090
1091
|
};
|
|
1091
1092
|
};
|
|
1092
1093
|
|
|
@@ -1132,10 +1133,10 @@ const getFileOperationsNestedPath = (path, root, pathSeparator) => {
|
|
|
1132
1133
|
let currentPath = '';
|
|
1133
1134
|
for (const part of parts) {
|
|
1134
1135
|
if (!part) continue;
|
|
1135
|
-
currentPath = currentPath
|
|
1136
|
+
currentPath = join2(currentPath, part);
|
|
1136
1137
|
operations.push({
|
|
1137
1138
|
type: CreateFolder$1,
|
|
1138
|
-
path:
|
|
1139
|
+
path: join2(root, currentPath)
|
|
1139
1140
|
});
|
|
1140
1141
|
}
|
|
1141
1142
|
return operations;
|
|
@@ -1391,7 +1392,7 @@ const treeToArrayInternal = (map, root, items, path, depth) => {
|
|
|
1391
1392
|
for (let i = 0; i < count; i++) {
|
|
1392
1393
|
const child = children[i];
|
|
1393
1394
|
const childPath = join2(path, child.name);
|
|
1394
|
-
const absolutePath =
|
|
1395
|
+
const absolutePath = join2(root, childPath);
|
|
1395
1396
|
items.push({
|
|
1396
1397
|
depth,
|
|
1397
1398
|
posInSet: i + 1,
|
|
@@ -3374,7 +3375,7 @@ const getFileOperationsElectron = async (root, paths, fileHandles) => {
|
|
|
3374
3375
|
} = fileHandle;
|
|
3375
3376
|
const path = paths[i];
|
|
3376
3377
|
operations.push({
|
|
3377
|
-
type:
|
|
3378
|
+
type: Copy$2,
|
|
3378
3379
|
path: join2(root, name),
|
|
3379
3380
|
from: path
|
|
3380
3381
|
});
|