Keep startup ready after individual file failures

This commit is contained in:
vorotamoroz committed 2026-09-04 12:50:46 +00:00
1 parent 045a328697
commit 6abc5cba64
15 files changed
+335 -5

No files matched your search

+16
View File
@@ -49,6 +49,10 @@ import { MARK_LOG_NETWORK_ERROR, MARK_LOG_SEPARATOR } from "@vrtmrz/livesync-com
import { NetworkWarningStyles } from "@vrtmrz/livesync-commonlib/compat/common/models/setting.const";
import { compatGlobal } from "@vrtmrz/livesync-commonlib/compat/common/coreEnvFunctions";
import { generateReport } from "@/common/reportTool.ts";
import {
ANDROID_LINUX_PATH_COMPONENT_UTF8_WARNING_BOUNDARY,
findPathComponentsExceedingUtf8Limit,
} from "@/common/pathCompatibility.ts";
// This module cannot be a core module because it depends on the Obsidian UI.
@@ -293,6 +297,18 @@ export class ModuleLog extends AbstractObsidianModule {
reasonWarn.push("Some platforms may be unable to process this file correctly: " + labels.join(" "));
}
}
const oversizedPathComponents = findPathComponentsExceedingUtf8Limit(thisFile.path);
if (oversizedPathComponents.length > 0) {
const components = oversizedPathComponents
.map(({ component, utf8Bytes }) => `${component} (${utf8Bytes} bytes)`)
.join(", ");
reasonWarn.push(
$msg("moduleLog.pathComponentTooLong", {
maxBytes: `${ANDROID_LINUX_PATH_COMPONENT_UTF8_WARNING_BOUNDARY}`,
components,
})
);
}
// Case Sensitivity
if (this.services.vault.shouldCheckCaseInsensitively()) {
const f = (await this.core.storageAccess.getFiles())