1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-11-26 02:52:30 +01:00

finish fixing folder names when lots of slashes exist; closes #2377

This commit is contained in:
Dane Everitt 2020-09-25 20:44:40 -07:00
parent fe849789a2
commit 4f21fa85f8
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53

View File

@ -24,7 +24,7 @@ const schema = object().shape({
const generateDirectoryData = (name: string): FileObject => ({
key: `dir_${name.split('/', 1)[0] ?? name}`,
name: name.split('/', 1)[0] ?? name,
name: name.replace(/^(\/*)/, '').split('/', 1)[0] ?? name,
mode: '0644',
size: 0,
isFile: false,