Commit Graph

6 Commits (027edcbe536230c4607f1d73ccff85c666ed146c)

Author SHA1 Message Date
Moraxyc 5f28532423
fix(test): ensure `setupStorages` is executed once (#6422)
In TestGetStorageVirtualFilesByPath() and TestGetBalancedStorage(), setupStorages() was being called twice, leading to a "UNIQUE constraint failed" error.
2024-05-09 14:22:19 +08:00
foxxorcat 6024e8d832
refactor: split the db package hook and cache to the op package (#2747)
* refactor:separate the setting method from the db package to the op package and add the cache

* refactor:separate the meta method from the db package to the op package

* fix:setting not load database data

* refactor:separate the user method from the db package to the op package

* refactor:remove user JoinPath error

* fix:op package user cache

* refactor:fs package list method

* fix:tile virtual paths (close #2743)

* Revert "refactor:remove user JoinPath error"

This reverts commit 4e20daaf9e.

* clean path directly may lead to unknown behavior

* fix: The path of the meta passed in must be prefix of reqPath

* chore: rename all virtualPath to mountPath

* fix: `getStoragesByPath` and `GetStorageVirtualFilesByPath`

is_sub_path:

/a/b isn't subpath of /a/bc

* fix: don't save setting if hook error

Co-authored-by: Noah Hsu <i@nn.ci>
2022-12-18 19:51:20 +08:00
Noah Hsu 3b6d8987db chore: add id to resp of create storage 2022-11-13 20:17:10 +08:00
Noah Hsu 71d30b6819 chore: rename `index` to `order` of storage 2022-09-07 15:55:15 +08:00
Noah Hsu 284274b37e feat: add 123pan driver 2022-09-01 22:13:37 +08:00
Noah Hsu 7ac1d14eeb style: shorten name `operations` to `op` 2022-08-31 21:01:15 +08:00