mirror of
https://github.com/Nezumi-2711/onedrive-vercel-index.git
synced 2026-09-22 13:38:45 +00:00
+2
-1
@@ -8,10 +8,11 @@ import { compareHashedToken } from '../../utils/tools'
|
||||
|
||||
const basePath = pathPosix.resolve('/', apiConfig.base)
|
||||
const encodePath = (path: string) => {
|
||||
const encodedPath = pathPosix.join(basePath, pathPosix.resolve('/', path))
|
||||
let encodedPath = pathPosix.join(basePath, pathPosix.resolve('/', path))
|
||||
if (encodedPath === '/' || encodedPath === '') {
|
||||
return ''
|
||||
}
|
||||
encodedPath = encodedPath.replace(/\/$/, '')
|
||||
return `:${encodeURIComponent(encodedPath)}`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user