This commit is contained in:
dieriba
2025-10-14 18:07:40 +02:00
committed by GitHub
parent b1b15663c9
commit efec3fb568

View File

@@ -349,21 +349,21 @@
}
const parts = trimmedPath.split('/')
if (parts.length !== 3) {
return 'Path must have exactly 3 parts: u/{user}/{resource} or f/{folder}/{resource}'
if (parts.length < 3) {
return 'Expected path format: u/{user}/{resource} or f/{folder}/{resource}'
}
if (parts[1] === '') {
return 'Username/folder name cannot be empty'
}
if (parts[2] === '') {
const last = parts[parts.length - 1]
if (last.length === 0) {
return 'Resource name cannot be empty'
}
if (parts[2] === '*') return null
if (last === '*') return null
if (parts[2].includes('*')) {
if (last.includes('*')) {
return 'Wildcards can only be used as the full resource name (*)'
}