Compare commits

..

No commits in common. '77d1b141806ae0acdb96afcac118f253d34f4997' and 'a0fa8da53cc3650d831c7b515007fed8c99bdcd7' have entirely different histories.

  1. 4
      CHANGELOG.md
  2. 4
      lib/persistence.js
  3. 4
      package-lock.json
  4. 2
      package.json

@ -6,10 +6,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [4.0.3] - 2023-12-13
### Fixed
- Fixed EPERM Exception when datastore is at the root of a disk on Windows [#48](https://github.com/seald/nedb/issues/48)
## [4.0.2] - 2023-05-05
### Fixed
- Fixed typo in documentation [#36](https://github.com/seald/nedb/pull/36)

@ -373,12 +373,8 @@ class Persistence {
* @private
*/
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 || parsedDir.base !== '') {
await storage.mkdirAsync(dir, { recursive: true, mode })
}
}
}
// Interface

4
package-lock.json generated

@ -1,12 +1,12 @@
{
"name": "@seald-io/nedb",
"version": "4.0.3",
"version": "4.0.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@seald-io/nedb",
"version": "4.0.3",
"version": "4.0.2",
"license": "MIT",
"dependencies": {
"@seald-io/binary-search-tree": "^1.0.3",

@ -1,6 +1,6 @@
{
"name": "@seald-io/nedb",
"version": "4.0.3",
"version": "4.0.2",
"files": [
"lib/**/*.js",
"browser-version/**/*.js",

Loading…
Cancel
Save