Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
LOCKファイル削除
Browse files Browse the repository at this point in the history
  • Loading branch information
maruga-se committed Mar 8, 2022
1 parent 358f1c2 commit 0b28573
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ const leveldown = require('leveldown');
// 住所から緯度経度付き場所型を返す
class EnrichmentAddress {
constructor() {
fs.unlinkSync(__dirname + "/db/LOCK");
const path = __dirname + "/db/LOCK";
if (fs.existsSync(path)) {
fs.unlinkSync(path);
}
this.db = levelup(leveldown(__dirname + "/db"));
}
disconnect() {
Expand Down

0 comments on commit 0b28573

Please sign in to comment.