Skip to content

Commit

Permalink
fix: - [fs.utimes doesn't support number or string on Windows ·…
Browse files Browse the repository at this point in the history
… Issue #33227 · nodejs/node]( nodejs/node#33227 )
  • Loading branch information
snomiao committed Jun 27, 2024
1 parent ce0429f commit ff4981c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class KeyvDirStore implements Keyv.Store<string> {
await this.#ready;
// console.log({ key, value, expires });
await writeFile(this.#path(key), value); // create a expired file
await utimes(this.#path(key), +new Date(), new Date(expires ?? 0)); // set a future expires time (0 as never expired)
await utimes(this.#path(key), new Date(), new Date(expires ?? 0)); // set a future expires time (0 as never expired)
return true;
}
async delete(key: string) {
Expand Down

0 comments on commit ff4981c

Please sign in to comment.