Skip to content

Commit

Permalink
DT-757 Replaces deprecated fs.rmdir by fs.rm
Browse files Browse the repository at this point in the history
  • Loading branch information
agustingroh committed Dec 15, 2023
1 parent 5f78b37 commit 1c4e7f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/modules/searchEngine/indexer/Indexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class Indexer {

public async saveIndex(index: any, pathToDictionary: string) {
if (fs.existsSync(pathToDictionary)) {
fs.rmdirSync(pathToDictionary, { recursive: true });
fs.rmSync(pathToDictionary, { recursive: true, force: true });
}
fs.mkdirSync(pathToDictionary);
await index.export((key: any, data: string | NodeJS.ArrayBufferView) => {
Expand Down

0 comments on commit 1c4e7f7

Please sign in to comment.