Fix correct path for filmstrips when you use an alias (#3225)

This commit is contained in:
Peter Hedenskog 2020-12-28 21:54:31 +01:00 committed by GitHub
parent b33ba0dc04
commit 31df2d327b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -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 => {

View File

@ -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
)
: [];