From 95e4d064a4a5edf8e3c0946b504082512563c789 Mon Sep 17 00:00:00 2001 From: Dakedres Date: Thu, 11 Apr 2024 08:57:45 -0600 Subject: [PATCH] Fixed a bug where images would have the wrong pathname upon being first downloaded --- lib.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib.js b/lib.js index e929c4a..7bfaaf6 100755 --- a/lib.js +++ b/lib.js @@ -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}`))