|
@@ -37,26 +37,36 @@ class PageOperationService {
|
|
|
if (isRecursively) {
|
|
if (isRecursively) {
|
|
|
if (fromPathToOp != null && !isTrashPage(fromPathToOp)) {
|
|
if (fromPathToOp != null && !isTrashPage(fromPathToOp)) {
|
|
|
const fromFlag = fromPaths.some(p => isEitherOfPathAreaOverlap(p, fromPathToOp));
|
|
const fromFlag = fromPaths.some(p => isEitherOfPathAreaOverlap(p, fromPathToOp));
|
|
|
|
|
+ if (fromFlag) return false;
|
|
|
|
|
+
|
|
|
const toFlag = toPaths.some(p => isEitherOfPathAreaOverlap(p, fromPathToOp));
|
|
const toFlag = toPaths.some(p => isEitherOfPathAreaOverlap(p, fromPathToOp));
|
|
|
- if (fromFlag || toFlag) return false;
|
|
|
|
|
|
|
+ if (toFlag) return false;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
if (toPathToOp != null && !isTrashPage(toPathToOp)) {
|
|
if (toPathToOp != null && !isTrashPage(toPathToOp)) {
|
|
|
const fromFlag = fromPaths.some(p => isPathAreaOverlap(p, toPathToOp));
|
|
const fromFlag = fromPaths.some(p => isPathAreaOverlap(p, toPathToOp));
|
|
|
|
|
+ if (fromFlag) return false;
|
|
|
|
|
+
|
|
|
const toFlag = toPaths.some(p => isPathAreaOverlap(p, toPathToOp));
|
|
const toFlag = toPaths.some(p => isPathAreaOverlap(p, toPathToOp));
|
|
|
- if (fromFlag || toFlag) return false;
|
|
|
|
|
|
|
+ if (toFlag) return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
if (fromPathToOp != null && !isTrashPage(fromPathToOp)) {
|
|
if (fromPathToOp != null && !isTrashPage(fromPathToOp)) {
|
|
|
const fromFlag = fromPaths.some(p => isPathAreaOverlap(p, fromPathToOp));
|
|
const fromFlag = fromPaths.some(p => isPathAreaOverlap(p, fromPathToOp));
|
|
|
|
|
+ if (fromFlag) return false;
|
|
|
|
|
+
|
|
|
const toFlag = toPaths.some(p => isPathAreaOverlap(p, fromPathToOp));
|
|
const toFlag = toPaths.some(p => isPathAreaOverlap(p, fromPathToOp));
|
|
|
- if (fromFlag || toFlag) return false;
|
|
|
|
|
|
|
+ if (toFlag) return false;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
if (toPathToOp != null && !isTrashPage(toPathToOp)) {
|
|
if (toPathToOp != null && !isTrashPage(toPathToOp)) {
|
|
|
const fromFlag = fromPaths.some(p => isPathAreaOverlap(p, toPathToOp));
|
|
const fromFlag = fromPaths.some(p => isPathAreaOverlap(p, toPathToOp));
|
|
|
|
|
+ if (fromFlag) return false;
|
|
|
|
|
+
|
|
|
const toFlag = toPaths.some(p => isPathAreaOverlap(p, toPathToOp));
|
|
const toFlag = toPaths.some(p => isPathAreaOverlap(p, toPathToOp));
|
|
|
- if (fromFlag || toFlag) return false;
|
|
|
|
|
|
|
+ if (toFlag) return false;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|