Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
reruin committed Oct 12, 2021
1 parent 61e9e36 commit 5315088
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions packages/sharelist-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [0.1.6](https://github.com/reruin/sharelist/compare/v0.3.5...v0.1.6) (2021-10-12)



## [0.1.5](https://github.com/reruin/sharelist/compare/v0.3.3...v0.1.5) (2021-10-10)


Expand Down
8 changes: 4 additions & 4 deletions packages/sharelist-core/lib/driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ module.exports = (app) => {

const getParentId = async (id) => {
let data = await getById(id)
console.log(data)
return data?.extra.parent_id
}

Expand Down Expand Up @@ -178,7 +177,8 @@ module.exports = (app) => {
return {
id: parent.id,
type: 'folder',
name: 'sharelist root'
name: 'sharelist root',
size: parent.size || Number.MAX_SAFE_INTEGER
}
} else {
return parent?.files.find(i => i.name == filename)
Expand Down Expand Up @@ -424,7 +424,7 @@ module.exports = (app) => {
if (driver?.mv) {
let { fid, meta } = decode(id)
let { fid: target_fid } = decode(target_id)
console.log('move', id, target_id, target_fid)

let cache = driver.cache !== false
let parent_id
//需要预先获得parent_id
Expand All @@ -443,7 +443,7 @@ module.exports = (app) => {
if (!data.parent_id) {
data.parent_id = parent_id
}
console.log('rm', data.parent_id, target_id, id)

if (data.parent_id) app.cache.remove(`${encode(data.parent_id, meta)}#list`)

app.cache.remove(`${target_id}#list`)
Expand Down
4 changes: 2 additions & 2 deletions packages/sharelist-core/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "@sharelist/core",
"version": "0.1.5",
"version": "0.1.6",
"repository": "https://github.com/reruin/sharelist",
"license": "MIT",
"main": "index.js",
"scripts": {
"build": "echo \"Info: no specified\" && exit ",
"test": "node test/index.js",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s --commit-path .",
"release": "node ../../scripts/release.js"
"release": "node ../../scripts/release.js --commit-path ."
},
"dependencies": {
"mime": "^2.5.2",
Expand Down

0 comments on commit 5315088

Please sign in to comment.