Skip to content

Commit

Permalink
fix: use spec path for revivals (#33)
Browse files Browse the repository at this point in the history
This was a bug that caused older spec formats to fail (because the stored path was not the same as getting it from the pathid).
  • Loading branch information
fivecar authored Jan 28, 2023
1 parent 5617d1a commit 82dfd8f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,7 @@ export default class DownloadQueue {
curSpec.createTime = Date.now();

const [fileExists] = await Promise.all([
RNFS.exists(
this.pathFromId(curSpec.id, this.extensionFromUri(curSpec.url))
),
RNFS.exists(curSpec.path),
this.kvfs.write(this.keyFromId(curSpec.id), curSpec),
]);
if (!curSpec.finished || !fileExists) {
Expand Down

0 comments on commit 82dfd8f

Please sign in to comment.