From 589a6542ece70ab18135f357a4ca2ae9237d7e0e Mon Sep 17 00:00:00 2001 From: Matt Isenhower Date: Fri, 24 Nov 2017 13:53:19 -0800 Subject: [PATCH] Save images to the old path as well for now I think people tend to leave the site open in a tab for days/weeks at a time, so if anyone has the site open for a while and some new gear comes out this will let them continue to see the image with the old version of the site JS. --- src/updater/updaters/Updater.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/updater/updaters/Updater.js b/src/updater/updaters/Updater.js index db4e6cc..c58d9f6 100644 --- a/src/updater/updaters/Updater.js +++ b/src/updater/updaters/Updater.js @@ -113,6 +113,11 @@ class Updater { let splatnet = new SplatNet; let image = await this.handleRequest(splatnet.getImage(imagePath)); this.writeFile(localPath, image); + + // Temporary: Also save the file to the old path for now + // This allows for old versions of the site to continue downloading images + let oldPath = path.resolve('public/assets/img/splatnet') + '/' + path.basename(imagePath); + this.writeFile(oldPath, image); } catch (e) { } }