Skip to content

Commit 82dfd8f

Browse files
authored
fix: use spec path for revivals (#33)
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).
1 parent 5617d1a commit 82dfd8f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,9 +356,7 @@ export default class DownloadQueue {
356356
curSpec.createTime = Date.now();
357357

358358
const [fileExists] = await Promise.all([
359-
RNFS.exists(
360-
this.pathFromId(curSpec.id, this.extensionFromUri(curSpec.url))
361-
),
359+
RNFS.exists(curSpec.path),
362360
this.kvfs.write(this.keyFromId(curSpec.id), curSpec),
363361
]);
364362
if (!curSpec.finished || !fileExists) {

0 commit comments

Comments
 (0)