Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bugs
  • Category Operating System/Drivers
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by FranzFerdinand - 2006-07-13
Last edited by jdgordon - 2007-07-03

FS#5659 - renaming can generate filenames that are inaccessible from windows

I managed to rename the “pictures” folder in my X5 in “-<Pictures”. The “<” makes the folder name invalid, hence the folder is inaccessible.

Is being able to change file/dir name to an invalid name a bug?

Closed by  jdgordon
2007-07-03 09:53
Reason for closing:  Fixed

I tried it on my h120. I was able renaming by adding a "<" to a file which is then inaccessible in windows. The file shows up, but file operations fail. BUT when connecting to a linux box I can access and modify that file. So the filename is not invalid per se to the FAT filesystem, but only windows' capabilities are limited (in fact, I noted more than once that windows is pretty limited regarding "legal" characters in filenames, as the filesystem itself supports more).
Also, I tried renaming a file by adding a "/", which is definitely invalid on FAT filesystems. That rename failed, so I wouldn't say you can generate invalid filenames using rockbox, only filenames that aren't accessible from windows.

Microsoft wrote the FAT32 specification, and according to their (publicly available) specification, the only special characters allowed in the first 127 characters of the ASCII table are the following:

$ % ' - _ @ ~ ` ! ( ) { } ^ # &
+ , ; = [ ]
. <space>

Maybe the validation code should be a little more strict…?

IIRC, the validation code is practically nonexistant. Yeah, I just checked. The only thing that is checked, as far as I can see, is that the filename doesn't end in a "." (which got filed as a bugreport). The place to improve error-checking is firmware/fat.c line 1177 (fat_checkname()).

I believe Rockbox shouldn't break the FAT specs (which I admittedly haven't read), even if Linux is more forgiving.

I've written a patch  FS#6358  which checks for the following illegal characters: " * / : < > ?
|

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing