fix config dir special empty condiction
This commit is contained in:
parent
ace16de20c
commit
74125f8dff
@ -361,7 +361,7 @@ const ensembleMixedEnties = async (
|
|||||||
const skipOrNotResults: Record<string, IsSkipResult> = {};
|
const skipOrNotResults: Record<string, IsSkipResult> = {};
|
||||||
|
|
||||||
// remote has to be first
|
// remote has to be first
|
||||||
let remoteMaySkipCount = 0;
|
let remoteMaySkipCountAndNotConfig = 0;
|
||||||
for (const remote of remoteEntityList) {
|
for (const remote of remoteEntityList) {
|
||||||
const remoteCopied = ensureMTimeOfRemoteEntityValid(
|
const remoteCopied = ensureMTimeOfRemoteEntityValid(
|
||||||
copyEntityAndFixTimeFormat(remote, serviceType)
|
copyEntityAndFixTimeFormat(remote, serviceType)
|
||||||
@ -379,8 +379,8 @@ const ensembleMixedEnties = async (
|
|||||||
onlyAllowPaths
|
onlyAllowPaths
|
||||||
);
|
);
|
||||||
skipOrNotResults[key] = skipOrNot;
|
skipOrNotResults[key] = skipOrNot;
|
||||||
if (skipOrNot.finalIsIgnored) {
|
if (skipOrNot.finalIsIgnored && !key.startsWith(configDir)) {
|
||||||
remoteMaySkipCount += 1;
|
remoteMaySkipCountAndNotConfig += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 20240907: users (not on windows) doesn't like it. revert back now.
|
// 20240907: users (not on windows) doesn't like it. revert back now.
|
||||||
@ -402,8 +402,10 @@ const ensembleMixedEnties = async (
|
|||||||
profiler?.insertSize("sizeof finalMappings", finalMappings);
|
profiler?.insertSize("sizeof finalMappings", finalMappings);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
Object.keys(finalMappings).length - remoteMaySkipCount === 0 ||
|
Object.keys(finalMappings).filter((k) => !k.startsWith(configDir)).length -
|
||||||
localEntityList.length === 0
|
remoteMaySkipCountAndNotConfig ===
|
||||||
|
0 ||
|
||||||
|
localEntityList.filter((e) => !e.key?.startsWith(configDir)).length === 0
|
||||||
) {
|
) {
|
||||||
// Special checking:
|
// Special checking:
|
||||||
// if one side is totally empty,
|
// if one side is totally empty,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user