Skip to content

Commit 554b4a3

Browse files
committed
fix: change invalid filename characters
1 parent ee6d168 commit 554b4a3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## 1.5
44

5+
### 1.5.1
6+
7+
- bugfix: It generated an error code if there was an @ sign in the file name. We tried to protect all possible characters: `!&()+./@{}~-`
8+
59
### 1.5.0
610

711
- New engine type (-e psychic2) for PsychicHttp v2

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ for (const [originalFilename, content] of files) {
3535
summary.filecount++;
3636

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

0 commit comments

Comments
 (0)