From ebb2c5f791eed0cdf3245c2ff931af35079429a7 Mon Sep 17 00:00:00 2001 From: mcdinner Date: Sun, 3 Jul 2022 16:35:12 +0200 Subject: [PATCH] Remove cachePathExists property (Issue #800) Remove cachePathsExist property to ensure missing cache directories are recreated when EnsureCachePaths() called. --- server/managers/CacheManager.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/server/managers/CacheManager.js b/server/managers/CacheManager.js index 3a0e5bf1..3b958068 100644 --- a/server/managers/CacheManager.js +++ b/server/managers/CacheManager.js @@ -10,13 +10,9 @@ class CacheManager { this.CachePath = Path.join(global.MetadataPath, 'cache') this.CoverCachePath = Path.join(this.CachePath, 'covers') this.ImageCachePath = Path.join(this.CachePath, 'images') - - this.cachePathsExist = false } async ensureCachePaths() { // Creates cache paths if necessary and sets owner and permissions - if (this.cachePathsExist) return - var pathsCreated = false if (!(await fs.pathExists(this.CachePath))) { await fs.mkdir(this.CachePath) @@ -36,8 +32,6 @@ class CacheManager { if (pathsCreated) { await filePerms.setDefault(this.CachePath) } - - this.cachePathsExist = true } async handleCoverCache(res, libraryItem, options = {}) {