Skip to content

Conversation

@GrosSacASac
Copy link
Contributor

fixes #856

@GrosSacASac GrosSacASac merged commit 81dd350 into master May 19, 2022
@GrosSacASac GrosSacASac deleted the improve-keep-extension branch May 19, 2022 10:13
return originalFilename;
}

// able to get composed extension with multiple dots
Copy link
Member

@tunnckoCore tunnckoCore Jun 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i remember pretty clearly there was some reason for that, some report or feature or issue.. but i don't remember the reason haha, so we can switch back to just getting the thing after the last dot with Node's builtin and all the drama goes to the trash.

*/
// slugify to avoid invalid filenames
// substr to define a maximum
return `${slugify(name)}.${slugify(ext, {separator: ''})}`.substr(0, 100);
Copy link
Member

@tunnckoCore tunnckoCore Jun 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we better use filenamify instead.

filenamify(name, { replacement: '-' })

there will not be needed for ext, because we can just return path.extname, as per the other comments.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ooh, that's from the examples dir, lol

Copy link
Member

@tunnckoCore tunnckoCore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the comments

@GrosSacASac

Copy link

@hasle4real hasle4real left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need advice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants