Skip to content

Commit f898c0a

Browse files
committed
Remove returns and linebreaks from filenames
1 parent f2118e4 commit f898c0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/helpers/file.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export async function archiveExtract(filePath: string, dirPath: string) {
4646
log('⚠️', 'Extracting files manually due to special characters in filenames');
4747
const entries = zip.getEntries();
4848
entries.forEach(entry => {
49-
const sanitizedName: string = entry.entryName.replace(/[<>:"|?*]/g, '_');
49+
const sanitizedName: string = entry.entryName.replace(/[<>:"|?*]/g, '_').replace(/[\r\n]/g, '');
5050
if (!entry.isDirectory) {
5151
const outputPath = path.join(dirPath, sanitizedName);
5252
dirCreate(path.dirname(outputPath));

0 commit comments

Comments
 (0)