diff --git a/lib/persistence.js b/lib/persistence.js index f10ec57..ba359a5 100755 --- a/lib/persistence.js +++ b/lib/persistence.js @@ -375,7 +375,7 @@ class Persistence { static async ensureDirectoryExistsAsync (dir, mode = DEFAULT_DIR_MODE) { const parsedDir = path.parse(path.resolve(dir)) // this is because on Windows mkdir throws a permission error when called on the root directory of a volume - if (process.platform !== 'win32' || parsedDir.dir !== parsedDir.root) { + if (process.platform !== 'win32' || parsedDir.dir !== parsedDir.root || parsedDir.base !== '') { await storage.mkdirAsync(dir, { recursive: true, mode }) } }