Skip to content

Commit

Permalink
Address PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnovov committed Oct 23, 2023
1 parent 7cd498f commit 7bf706b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 36 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"joplin-turndown-plugin-gfm": "1.0.12",
"plain-tag": "0.1.3",
"protobufjs": "7.2.5",
"static-params": "0.4.0",
"xml-flow": "1.0.4"
}
}
7 changes: 3 additions & 4 deletions src/formats/apple-notes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,10 +350,9 @@ export class AppleNotesImporter extends FormatImporter {

try {
const binary = await this.getAttachmentSource(this.resolvedAccounts[this.owners[row.ZNOTE]], sourcePath);
const attachmentFolder = await this.getAttachmentFolder(this.resolvedFiles[row.ZNOTE]);
//@ts-ignore
const outPath = this.app.vault.getAvailablePath(
`${await this.getAttachmentPath(this.resolvedFiles[row.ZNOTE])}/${outName}`, outExt
);
const outPath = this.app.vault.getAvailablePath(`${attachmentFolder}/${outName}`, outExt);

file = await this.vault.createBinary(
outPath, binary,
Expand Down Expand Up @@ -390,7 +389,7 @@ export class AppleNotesImporter extends FormatImporter {
}
}

async getAttachmentPath(note: TFile): Promise<string> {
async getAttachmentFolder(note: TFile): Promise<string> {
if (this.cachedAttachmentPath) return this.cachedAttachmentPath;

let attachmentSetting = this.app.vault.getConfig('attachmentFolderPath');
Expand Down
31 changes: 0 additions & 31 deletions src/formats/apple-notes/sqlite/static-params.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/formats/apple-notes/sqlite/utils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import plain from 'plain-tag';
import { asStatic, asParams } from './static-params';
import { asStatic, asParams } from './static-params/sql';

export const error = (rej, reason) => {
const code = 'SQLITE_ERROR';
Expand Down

0 comments on commit 7bf706b

Please sign in to comment.