Please familiarise yourself with the forum rules & guidelines

Strange sample names in XML Files

0

While developing a missing sample fixer, I stumbled upon strange fileName entries in the XMLs.

1) cat *.XML | grep "~"
gives me a few results (in SONGS, KITS or SYNTHS)
for example:
SAMPLES/ARTISTS/CHAZ/CB1-BD~1.WAV
2) such a file does not exist on the SD card, however Deluge can load the sample nevertheless.

maybe somebody could look up if he has such fileName entries too. thanks. or maybe Rohan would already know what this is.

Comments

  • 0
    amiga909amiga909 Switzerland

    can't say whenit happens Deluge writes these strange sample names in a XML file.
    But 100% sure Deluge can read this kind of files though hey simply don't exist on the SD Card..

  • 1
    drGrovdrGrov Hampshire, UK

    It's a product of the way long file names are supported by FAT32 file system. Each file effectively has two names, the long name and a backward's compatible 8.3 name (which tends to be the first few characters ~ and a number).

    So "CB1-bdrum1.wav" is also "CB1-BD~1.WAV" and both names will work.

    On Windows, "DIR /X" will show the 8.3 versions of the file names.

  • 0
    amiga909amiga909 Switzerland

    thanks drGrov, that helps a lot. u say its a product? or a bug?
    will look into it but there might be nothing i can do on a Mac to deal with ancient Windows file naming.
    at least i can do a better regex to check for 8.3 filenames, and just skip them for now.

    @rohan not a big deal, maybe interesting for you to know. i am fully aware this

    • happens rarely (in my XMLs out of 5000 sample assignments 10 paths got 8.3 naming)
    • is hard to reproduce
    • could be a bug in the filesystem driver u cant really do anything about it
  • 0
    drGrovdrGrov Hampshire, UK

    It's a feature :) Originally FAT file systems only supported 8.3 file names. When FAT32 was introduced, Microsoft left the old 8.3 names for backwards compatibility and stored the longer version of the name elsewhere.

  • 0
    amiga909amiga909 Switzerland

    @drGrov said:
    It's a feature :) Originally FAT file systems only supported 8.3 file names. When FAT32 was introduced, Microsoft left the old 8.3 names for backwards compatibility and stored the longer version of the name elsewhere.

    are you sure? very thankful u could explain me this so hope I dont question ur statement too much 😀
    however, there does not seem to be a consistency, its not like all long file names are stored as 8.3 in the XML, only a very few. and its bad if Deluge writes filenames in a format that is not cross platform. will dig deeper, hope i can find a solution for this. if not, not a big problem i guess, happy i at least know what this is.

  • 0
    drGrovdrGrov Hampshire, UK

    Yep. Long file names were bolted on to the FAT (8.3) file system by using some clever tricks storing data in directory entries (see https://en.wikipedia.org/wiki/Long_filename).

    I can't speak for the file system code used by the Deluge but it's obvious that it does support long file names as they are used elsewhere. However, I'd guess that, for whatever reason, it was unable to access the long file name data when those particular XML files were written and so fell back to the shortened version.

Sign In or Register to comment.