Skip to content

Commit

Permalink
fix(plugin): fix some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
reruin committed Oct 19, 2021
1 parent 62ad7e5 commit 5fbecac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 1 addition & 4 deletions packages/sharelist-plugin/lib/driver.fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,10 @@ class FileSystem {
return files
}

return app.error({ message: 'path is not exist' })
return this.app.error({ message: 'path is not exist' })
}

async get(id) {
console.log('GET', id)
let stat = fileStat(ospath(id))
if (!stat) return this.app.error({ code: 404 })
return {
Expand Down Expand Up @@ -273,7 +272,6 @@ class FileSystem {
let dir = dirname(filepath)
let targetpath = join(dir, name)
try {
console.log('rename', filepath, targetpath)
fs.renameSync(filepath, targetpath)
} catch (e) {
console.log(e)
Expand All @@ -295,7 +293,6 @@ class FileSystem {
let targetpath = ospath(this.parsePath(target))

let dst = join(targetpath, basename(id))
console.log('move', filepath, targetpath)

try {
fs.renameSync(filepath, dst)
Expand Down
4 changes: 1 addition & 3 deletions packages/sharelist-plugin/lib/driver.onedrive.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ class Driver {
if (error) return { error: error }

if (data.error) return { error: data.error.message }
console.log(data.parentReference)

let result = {
id: data.id,
name: data.name,
Expand Down Expand Up @@ -647,8 +647,6 @@ class Driver {
contentType: 'stream',
})

console.log(uploadData)

return {
id: data.id,
name: data.name,
Expand Down

0 comments on commit 5fbecac

Please sign in to comment.