nschlia / ffmpegfs

FUSE-based transcoding filesystem with video support from many formats to FLAC, MP4, TS, WebM, OGG, MP3, HLS, and others.
https://nschlia.github.io/ffmpegfs/
GNU General Public License v3.0
196 stars 14 forks source link

CUE Sheets Can Create Invalid Filenames With '/' #125

Closed Martin2112 closed 2 years ago

Martin2112 commented 2 years ago

Came across this in the following cue sheet extract:

FILE "Rush - 2112.flac" WAVE
  TRACK 01 AUDIO
    TITLE "2112: I. Overture / II. The Temples of Syrinx / III. Discovery / IV. Presenta..."
    PERFORMER "Rush"
    REM COMPOSER ""
    INDEX 00 00:00:00
    INDEX 01 00:00:33
    INDEX 02 04:33:13
    INDEX 03 06:46:55
    INDEX 04 10:16:13
    INDEX 05 13:58:20
    INDEX 06 15:58:25
    INDEX 07 18:19:55

This doesn't seem to cause an error but the track file isn't visible:

[martin@zen ~]$ ls -l /export/cdrip/flactrack/Music/Rush/Rush\ -\ 2112.flac.tracks/
total 0
-rwxr--r--. 1 martin martin 0 Mar  7 19:57 '02. Rush - A Passage to Bangkok [03-34.440].flac'
-rwxr--r--. 1 martin martin 0 Mar  7 19:57 '03. Rush - The Twilight Zone [03-18.600].flac'
-rwxr--r--. 1 martin martin 0 Mar  7 19:57 '04. Rush - Lessons [03-52.000].flac'
-rwxr--r--. 1 martin martin 0 Mar  7 19:57 '05. Rush - Tears [03-32.400].flac'
-rwxr--r--. 1 martin martin 0 Mar  7 19:57 '06. Rush - Something for Nothing [04-06.373].flac'
nschlia commented 2 years ago

Yes, did not think of that, but "/" is clearly not valid in filenames under Unix. Needs to be filtered.

I'll take a look at your fix ASAP, thanks a lot.