Skip to content

Commit

Permalink
Fis: missing parent in store-vault-sync file adapters
Browse files Browse the repository at this point in the history
  • Loading branch information
b-camphart committed Mar 3, 2024
1 parent acf8706 commit 12a98b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/model/store-vault-sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
import { fileNameFromPath } from "./note-utils";
import { findScene, sceneFolderPath } from "./scene-navigation";
import { draftForNote, possibleDraftFileCreated } from "./draft";
import { VaultDirectory } from "src/utils/VaultDirectory";
import { TFolderDirectory, VaultDirectory } from "src/utils/VaultDirectory";
import type { Note } from "./file-system";

type FileWithMetadata = {
Expand Down Expand Up @@ -129,6 +129,7 @@ export class StoreVaultSync {
{
path: file.path,
name: file.name,
parent: new TFolderDirectory(this.app, file.parent),
getMetadata: () => cache,
modifyFrontMatter: (transform) =>
this.app.fileManager.processFrontMatter(file, transform),
Expand Down Expand Up @@ -333,6 +334,7 @@ export class StoreVaultSync {
return draftForNote(new VaultDirectory(this.app), {
path: file.file.path,
name: file.file.name,
parent: new TFolderDirectory(this.app, file.file.parent),
getMetadata: () => file.metadata,
modifyFrontMatter: (transform) =>
this.app.fileManager.processFrontMatter(file.file, transform),
Expand Down
2 changes: 1 addition & 1 deletion src/utils/VaultDirectory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class TFileNote implements Note {
}
}

class TFolderDirectory implements Directory {
export class TFolderDirectory implements Directory {
get isDirectory(): true {
return true;
}
Expand Down

0 comments on commit 12a98b7

Please sign in to comment.