Small changes
This commit is contained in:
parent
7293c58a71
commit
b52c09fecc
8 changed files with 74 additions and 297 deletions
|
|
@ -1,11 +1,11 @@
|
|||
import type { DocumentRecord, RelativePath } from "../sync-operations/types";
|
||||
import type { DocumentRecord, DocumentWithPath, RelativePath } from "../sync-operations/types";
|
||||
import { EMPTY_HASH } from "./hash";
|
||||
|
||||
// TODO: make this smarter so that offline files can be renamed & edited at the same time
|
||||
export async function findMatchingFile(
|
||||
contentHash: string,
|
||||
candidates: { path: RelativePath; record: DocumentRecord }[]
|
||||
): Promise<{ path: RelativePath; record: DocumentRecord } | undefined> {
|
||||
): Promise<DocumentWithPath | undefined> {
|
||||
if (contentHash === await EMPTY_HASH) {
|
||||
return undefined;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue