Skip to content

Commit

Permalink
fix(file): don't throw deleting a file that does not exist (#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
matmilbury authored Sep 13, 2024
1 parent 216ee4f commit b9d2adf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/file/src/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ export class FileAdapter<T> implements StorageAdapter<T> {
}

async delete(key: string) {
await fs.remove(this.resolveSessionPath(key));
try {
await fs.remove(this.resolveSessionPath(key));
} catch {}
}
}

0 comments on commit b9d2adf

Please sign in to comment.