Menu ▾ ▴

#950 No output at all in Linux if filename contains a '?' (question mark)

Incorrect_result
open-accepted
None
6
2016-01-05
2015-10-09
Ray Charles
No

No output at all in Linux if filename contains a '?' (question mark) (correclty escaped). Example:

root@myserver:/music/mp3/ZZ Top/The ZZ Top Six Pack# ls 'Have You Heard?.mp3'
Have You Heard?.mp3
root@myserver:/music/mp3/ZZ Top/The ZZ Top Six Pack# file 'Have You Heard?.mp3'
Have You Heard?.mp3: Audio file with ID3 version 2.4.0, contains: MPEG ADTS, layer III, v1, 192 kbps, 44.1 kHz, Stereo
root@myserver:/music/mp3/ZZ Top/The ZZ Top Six Pack# mediainfo 'Have You Heard?.mp3'

root@myserver:/music/mp3/ZZ Top/The ZZ Top Six Pack# mv Have\ You\ Heard\?.mp3 Have\ You\ Heard.mp3
root@myserver:/music/mp3/ZZ Top/The ZZ Top Six Pack# mediainfo Have\ You\ Heard.mp3
General
Complete name : Have You Heard.mp3
Format : MPEG Audio
File size : 4.57 MiB
Duration : 3mn 19s
Overall bit rate mode : Constant
Overall bit rate : 192 Kbps
Album : The ZZ Top Six Pack
Track name : Have You Heard?
Track name/Position : 10
Performer : ZZ Top
Genre : Rock
Recorded date : 1987
Comment : Tags set according to BB naming convention

Audio
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 3
Duration : 3mn 19s
Bit rate mode : Constant
Bit rate : 192 Kbps
Channel count : 2 channels
Sampling rate : 44.1 KHz
Compression mode : Lossy
Stream size : 4.57 MiB (100%)

I onlyt get output if I rename the file as shown above. This is clearly a mediainfo bug. All other programs have no issues with the question mark ("file", for instance, as showen above). I have the suspicion that other characters such as '' in the filename might suffer from the same issue (haven't checked though).

Best,
Ray

Discussion

  • Ray Charles

    Ray Charles - 2015-10-09

    Some corrections to my previous post:

    only
    shown
    characters such as '" (asterisk)

    BTW: I checked. Same symptom for asterisks indeed.

    Best,
    Ray

     
  • Jerome Martinez

    Jerome Martinez - 2015-10-09

    Right, this is a bug in MediaInfo, due to historical reasons (first developed on Windows, no ? and * in filenames)

     
  • Jerome Martinez

    Jerome Martinez - 2015-10-09
    • status: open --> open-accepted
    • assigned_to: Jerome Martinez
     
  • Ray Charles

    Ray Charles - 2015-10-10

    Hi Jerome,

    thanks for looking into this.

    It's likely that the list of affected characters is much longer than just asterisk and question mark:

    There's a page on VFS catia mappings for Samba listing many more (but still not sure if that list in complete):

    "... invalid windows characters \ / : * ? " < > | and the blank character..."

    Cf. https://www.samba.org/samba/docs/man/manpages/vfs_catia.8.html

    Instead of collecting a positive list... perhaps it's simpler to look at the issue from the other direction, because the negative list is very short for Linux: all characters except the forward slash / are acceptable as part of filenames in Linux.

    Best,
    Ray

     
  • Oliver Paukstadt

    Worked around this with this quick patch for Zenlib.
    I am not sure about consequences on other platforms in this ifdef challenge.

     
    • Jerome Martinez

      Jerome Martinez - 2016-01-05

      there are some issues with this kind of patch if I remember well e.g. when someone want to use wildcards. So I am not willing to remove these lines without tests.

       
  • Oliver Paukstadt

    At least for the Linux/UNIX Platforms wildcards are a shell feature and nothing a library has to deal with.

     

Log in to post a comment.