fix: root path check always return false (No marker found)

This commit is contained in:
Methapon2001 2023-12-13 21:02:37 +07:00
parent 35195f78bf
commit e020c0d6c9
No known key found for this signature in database
GPG key ID: 849924FEF46BD132

View file

@ -168,6 +168,7 @@ async function listFile(path: string[]) {
}
async function checkPathExist(bucket: string, path: string) {
if (path.split("/").filter(Boolean).length === 0) return true; // root does not contain any mark
return await checkFileExist(bucket, `${path}/.keep`);
}