mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-11-05 15:58:19 +00:00
Keep NFC E2E fixtures compatible with source checks
This commit is contained in:
1 parent
538fc52903
commit
2716d68b3d
2 files changed
+4
-4
No files matched your search
@@ -178,8 +178,8 @@ async function assertSinglePhysicalUnicodeFile(
|
||||
): Promise<void> {
|
||||
const segments = relativePath.split("/");
|
||||
const stableParent = join(vaultPath, ...segments.slice(0, -2));
|
||||
const expectedFolder = segments.at(-2)!.normalize("NFC");
|
||||
const expectedFilename = segments.at(-1)!.normalize("NFC");
|
||||
const expectedFolder = segments[segments.length - 2].normalize("NFC");
|
||||
const expectedFilename = segments[segments.length - 1].normalize("NFC");
|
||||
const physicalFolders = (await readdir(stableParent, { withFileTypes: true })).filter(
|
||||
(entry) => entry.isDirectory() && entry.name.normalize("NFC") === expectedFolder
|
||||
);
|
||||
|
||||
@@ -2,7 +2,7 @@ import { randomBytes } from "node:crypto";
|
||||
import { access, mkdir, readFile, readdir, writeFile } from "node:fs/promises";
|
||||
import { connect } from "node:net";
|
||||
import { dirname, join } from "node:path";
|
||||
import type { ObsidianLiveSyncSettings } from "@vrtmrz/livesync-commonlib/compat/common/types";
|
||||
import type { FilePathWithPrefix, ObsidianLiveSyncSettings } from "@vrtmrz/livesync-commonlib/compat/common/types";
|
||||
import { encodeTimeBoundSetupURI } from "@vrtmrz/livesync-commonlib/setup-uri";
|
||||
import { createNewVaultSettings, P2P_DEFAULT_SETTINGS, PREFERRED_BASE } from "@vrtmrz/livesync-commonlib/settings";
|
||||
import { upsertRemoteConfigurationInPlace } from "@vrtmrz/livesync-commonlib/remote-configurations";
|
||||
@@ -594,7 +594,7 @@ async function seedLegacyNfdMetadata(
|
||||
// Obsidian's file cache normalises names even in legacy mode. Seed the
|
||||
// legacy ID of an NFD-writing host while retaining real Chunk documents.
|
||||
const legacyId = await path2id_base(
|
||||
pathNfd,
|
||||
pathNfd as FilePathWithPrefix,
|
||||
shared.encrypted ? shared.e2eePassphrase : false,
|
||||
true,
|
||||
shared.encrypted ? shared.idKey : undefined
|
||||
|
||||
Reference in new issue
Block a user