• Status Closed
  • Percent Complete
  • 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 tSav - 2006-07-13
Last edited by Jonathan Gordon - 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  Jonathan Gordon
2007-07-03 09:53
Reason for closing:  Fixed
Dominik Riebeling commented on 2006-07-14 06:59

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.

Bryn Smith commented on 2006-08-07 02:54

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…?

Jonas Häggqvist commented on 2006-09-22 09:23

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.

Jonas Häggqvist commented on 2006-11-25 12:04

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


Available keyboard shortcuts


Task Details

Task Editing