Fixed a bug where images would have the wrong pathname upon being first downloaded

This commit is contained in:
Dakedres 2024-04-11 08:57:45 -06:00
parent 6fabb9f858
commit 95e4d064a4

4
lib.js
View File

@ -611,8 +611,8 @@ export const downloadImage = async (url, basename, source, view) => {
return url
}
let relativePath = basename + extension
let path = Path.join(view.path, view.imageStoreDirectory, relativePath)
let relativePath = Path.join(view.imageStoreDirectory, basename + extension)
let path = Path.join(view.path, relativePath)
const download = () => write(path, response.body)
.then(annotate( `Downloaded ${relativePath}`))