Skip to content

Commit

Permalink
fix: change invalid filename characters
Browse files Browse the repository at this point in the history
  • Loading branch information
BCsabaEngine committed Sep 9, 2024
1 parent ee6d168 commit 554b4a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## 1.5

### 1.5.1

- bugfix: It generated an error code if there was an @ sign in the file name. We tried to protect all possible characters: `!&()+./@{}~-`

### 1.5.0

- New engine type (-e psychic2) for PsychicHttp v2
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ for (const [originalFilename, content] of files) {
summary.filecount++;

const filename = originalFilename.replace(/\\/g, '/');
const dataname = filename.replace(/[./-]/g, '_');
const dataname = filename.replace(/[!&()+./@{}~-]/g, '_');
let extension = path.extname(filename).toUpperCase();
if (extension.startsWith('.')) extension = extension.slice(1);

Expand Down

0 comments on commit 554b4a3

Please sign in to comment.