1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2025-12-03 23:00:25 +02:00

improving diagnostics

This commit is contained in:
Braun Patrik
2017-07-14 22:56:25 +02:00
parent be74b854b7
commit 1d63cfaca4
2 changed files with 8 additions and 2 deletions

View File

@@ -15,10 +15,14 @@ class ProjectPathClass {
return path.join(pathStr, path.sep);
}
getAbsolutePath(pathStr: string): string {
return this.isAbsolutePath(pathStr) ? pathStr : path.join(this.Root, pathStr);
}
constructor() {
this.Root = path.join(__dirname, "/../");
this.ImageFolder = this.isAbsolutePath(Config.Server.imagesFolder) ? Config.Server.imagesFolder : path.join(this.Root, Config.Server.imagesFolder);
this.ThumbnailFolder = this.isAbsolutePath(Config.Server.thumbnail.folder) ? Config.Server.thumbnail.folder : path.join(this.Root, Config.Server.thumbnail.folder);
this.ImageFolder = this.getAbsolutePath(Config.Server.imagesFolder);
this.ThumbnailFolder = this.getAbsolutePath(Config.Server.thumbnail.folder);
this.FrontendFolder = path.join(this.Root, 'dist')
}
}