Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
JackGruber committed Aug 11, 2021
2 parents 022ef0d + 7624080 commit 9c38042
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## not released

- Fix: #19 Backups failed from Joplin version v2.2.5 and higher, due to the removed template function

## v1.0.2 (2021-07-19)

- Improved: Use of moments token
Expand Down
12 changes: 8 additions & 4 deletions src/Backup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -743,10 +743,14 @@ class Backup {
);

// Backup Templates
await this.backupFolder(
await await joplinWrapper.settingsGlobalValue("templateDir"),
path.join(activeBackupFolderProfile, "templates")
);
try {
await this.backupFolder(
await await joplinWrapper.settingsGlobalValue("templateDir"),
path.join(activeBackupFolderProfile, "templates")
);
} catch (error) {
this.log.info("No templateDir, Joplin >= v2.2.5");
}
}

private async backupFolder(src: string, dst: string): Promise<boolean> {
Expand Down

0 comments on commit 9c38042

Please sign in to comment.