Skip to content

Commit

Permalink
SFVReader: fix handling of multiple whitespaces after the filename
Browse files Browse the repository at this point in the history
Fixes #38
  • Loading branch information
maksis committed Mar 10, 2023
1 parent d41f452 commit 87aa1bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/helpers/SFVReader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const crc32Reg = /\s(\w{8})$/;
const reduceContent = (reduced: { [key in string]: string }, line: string) => {
const tokens = line.split(crc32Reg);
if (tokens[0] && tokens.length > 1) {
let name = tokens[0];
let name = tokens[0].trim();

// Quoted filename?
if (name[0] === '"' && name[name.length - 1] === '"') {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;COMMENT
;
file1.mp3 f8d45d01
file1.mp3 f8d45d01
FILE2.mp3 f8d45d01


0 comments on commit 87aa1bf

Please sign in to comment.