From c250e82998d13ccdcf7095ba0fb472e8ef49adbf Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Sun, 2 Mar 2025 18:27:02 +0000 Subject: [PATCH] Rename --- ...-matching-file-based-on-hash.ts => find-matching-file.ts} | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) rename frontend/sync-client/src/utils/{find-matching-file-based-on-hash.ts => find-matching-file.ts} (59%) diff --git a/frontend/sync-client/src/utils/find-matching-file-based-on-hash.ts b/frontend/sync-client/src/utils/find-matching-file.ts similarity index 59% rename from frontend/sync-client/src/utils/find-matching-file-based-on-hash.ts rename to frontend/sync-client/src/utils/find-matching-file.ts index 6a247f5f..27a4c875 100644 --- a/frontend/sync-client/src/utils/find-matching-file-based-on-hash.ts +++ b/frontend/sync-client/src/utils/find-matching-file.ts @@ -1,7 +1,8 @@ -import type { DocumentMetadata, RelativePath } from "src/persistence/database"; +import type { DocumentMetadata, RelativePath } from "../persistence/database"; import { EMPTY_HASH } from "./hash"; -export function findMatchingFileBasedOnHash( +// TODO: make this smarter so that offline files can be renamed & edited at the same time +export function findMatchingFile( contentHash: string, candidates: [RelativePath, DocumentMetadata][] ): [RelativePath, DocumentMetadata] | undefined {