(name)
| 257 | } |
| 258 | |
| 259 | function getExt(name) { |
| 260 | const idx = name.lastIndexOf('.'); |
| 261 | if (idx === -1) return ''; |
| 262 | return name.slice(idx + 1).toLowerCase(); |
| 263 | } |
| 264 | |
| 265 | function sanitizeRelativePath(raw, fallbackName) { |
| 266 | let path = String(raw || '').replace(/\\/g, '/').trim(); |