Skip to content

Commit

Permalink
🐛 Fix(custom): fix webdav rename bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuingsmile committed Dec 19, 2024
1 parent 873ed4b commit 7d4b9e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/uploader/webdav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ const handle = async (ctx: IPicGo): Promise<IPicGo | boolean> => {
clientOptions.authType = AuthType.Digest
}
const client: WebDAVClient = createClient(webdavplistOptions.host, clientOptions)
const pathToCreate = uploadPath === '/' ? '' : uploadPath
const fullUploadDirPath = path.dirname(`${uploadPath}${img.fileName}`)
const pathToCreate = fullUploadDirPath === '/' ? '' : fullUploadDirPath
if (pathToCreate) {
await client.createDirectory(pathToCreate, { recursive: true })
}
Expand Down

0 comments on commit 7d4b9e8

Please sign in to comment.