Skip to content

Commit

Permalink
fix: copy temp file to prevent `EXDEV: cross-device link not permitte…
Browse files Browse the repository at this point in the history
…d` (#132)
  • Loading branch information
Skn0tt authored Jan 9, 2024
1 parent 61206a0 commit 61b4ee6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ export class BlobsServer {
})

await fs.mkdir(dirname(dataPath), { recursive: true })
await fs.rename(tempDataPath, dataPath)
await fs.copyFile(tempDataPath, dataPath)
await fs.rm(tempDirectory, { force: true, recursive: true })

await fs.mkdir(dirname(metadataPath), { recursive: true })
Expand Down

0 comments on commit 61b4ee6

Please sign in to comment.