update approach for ensuring download directory always exists

This commit is contained in:
jmt-gh 2022-06-06 18:51:08 -07:00
parent c606a41314
commit 853513b926
3 changed files with 25 additions and 6 deletions

View file

@ -19,17 +19,17 @@ class CacheManager {
var pathsCreated = false
if (!(await fs.pathExists(this.CachePath))) {
await fs.ensureDir(this.CachePath)
await fs.mkdir(this.CachePath)
pathsCreated = true
}
if (!(await fs.pathExists(this.CoverCachePath))) {
await fs.ensureDir(this.CoverCachePath)
await fs.mkdir(this.CoverCachePath)
pathsCreated = true
}
if (!(await fs.pathExists(this.ImageCachePath))) {
await fs.ensureDir(this.ImageCachePath)
await fs.mkdir(this.ImageCachePath)
pathsCreated = true
}