Skip to content

Commit

Permalink
fix: cleanup on win32
Browse files Browse the repository at this point in the history
  • Loading branch information
Dwynr committed Sep 6, 2024
1 parent 579311d commit 49d7fc4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@filen/virtual-drive",
"version": "0.1.14",
"version": "0.1.15",
"description": "Filen Virtual Drive",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
7 changes: 3 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -730,10 +730,9 @@ export class VirtualDrive {
}
}

await new Promise<void>(resolve => {
this.rcloneProcess?.on("exit", resolve)
this.rcloneProcess?.kill("SIGTERM")
})
this.rcloneProcess?.kill("SIGTERM")

await new Promise<void>(resolve => setTimeout(resolve, 1000))

if (this.rcloneProcess.pid) {
await killProcessByPid(this.rcloneProcess.pid).catch(() => {})
Expand Down

0 comments on commit 49d7fc4

Please sign in to comment.