From 31df2d327ba47470ea9bc33022124f86a91ef3b6 Mon Sep 17 00:00:00 2001 From: Peter Hedenskog Date: Mon, 28 Dec 2020 21:54:31 +0100 Subject: [PATCH] Fix correct path for filmstrips when you use an alias (#3225) --- lib/core/resultsStorage/storageManager.js | 5 +++-- lib/plugins/html/htmlBuilder.js | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/core/resultsStorage/storageManager.js b/lib/core/resultsStorage/storageManager.js index 0b19897b2..769ad960a 100644 --- a/lib/core/resultsStorage/storageManager.js +++ b/lib/core/resultsStorage/storageManager.js @@ -46,8 +46,8 @@ module.exports = function storageManager(baseDir, storagePathPrefix, options) { getBaseDir() { return baseDir; }, - getFullPathToURLDir(url) { - return path.join(baseDir, pathToFolder(url, options)); + getFullPathToURLDir(url, alias) { + return path.join(baseDir, pathToFolder(url, options, alias)); }, getStoragePrefix() { return storagePathPrefix; @@ -55,6 +55,7 @@ module.exports = function storageManager(baseDir, storagePathPrefix, options) { copyToResultDir(filename) { return this.createDirectory().then(dir => fs.copy(filename, dir)); }, + // TODO is missing alias removeDataForUrl(url) { const dirName = path.join(baseDir, pathToFolder(url, options)); const removeDir = async dir => { diff --git a/lib/plugins/html/htmlBuilder.js b/lib/plugins/html/htmlBuilder.js index 907f203b1..e9cf10a0b 100644 --- a/lib/plugins/html/htmlBuilder.js +++ b/lib/plugins/html/htmlBuilder.js @@ -241,7 +241,7 @@ class HTMLBuilder { ? await filmstrip.getFilmstrip( medianPageInfo.data.browsertime.run, medianRun.runIndex, - this.storageManager.getFullPathToURLDir(url), + this.storageManager.getFullPathToURLDir(url, daurlAlias), options ) : []; @@ -304,7 +304,7 @@ class HTMLBuilder { ? await filmstrip.getFilmstrip( pageInfo.data.browsertime.run, iteration, - this.storageManager.getFullPathToURLDir(url), + this.storageManager.getFullPathToURLDir(url, daurlAlias), options ) : [];