Oh boy, this was great
the other day I was having some problems with eclipse, basically for some reason my folders and filenames were automatically getting renamed to lower case, I couldnt figure out why, at first I was blaming eclipse, you can read about these problems I had here:
In the end I thought it was eclipse, so posted a “WHY IS THIS HAPPENING TO ME” message to the eclipse newsgroups. At the end, I was informed that maybe my linux mount options are to blame and I should look up shortname property.
OMFG “?”?%”?”%!”%&&//%(&/(%&/$%!!!!!!!!!!!!!! FUCKING LINUX!!!!
To put it robustly.
You see, for some insanely stupid reason someone decided that automounting FAT32 partitions should use the property “shortname=lower” and if you check your Windows readable USB memory key in linux, you might find the same property.
What this means, is that ALL filenames, will be shown as lower case, regardless of the original filename, which MAY BE UPPER CASE. It will still come through as lower case. Why?? Who’s insane idea was this? So let me get this straight, I create a file called MANIFEST.MF, on a case retaining filesystem (which means, it’ll keep the case of the filename intact) and we’ll redisplay that file as manifest.mf ??? Since when are they the same file?
In terms of filesystems, here are some of the definitions which are important.
Case retaining means that if you create a file called MANIFEST.MF, it will retain (keep) the case you originally gave it. However, if you open the file “manifest.mf” you will STILL OPEN the same file. Hence it retains the case of the filename string, however when opening a file (to read, write, append, truncate, etc). It’s not important and will open anything which matches the string CONTENTS and not the string EXACTLY.
MANIFEST.MF is equal to manifest.mf MaNiFeSt.Mf MANIfest.mf, etc.
Case Sensitive, however, means the above, that it will retain case and that attempting to open the file for whatever reason, MUST GIVE the same identical string, with same upper case and lower case letters.
MANIFEST.MF is equal to: MANIFEST.MF
MANIFEST.MF is not equal to: Manifest.mf MANIfest.mf MaNiFeSt.Mf, etc.
So, FAT32, is case retaining, but not case sensitive. However eclipse is case sensitive, VERY VERY case sensitive. So, when the linux filesystem driver gives eclipse the filenames meta-inf and manifest.mf, eclipse looks whether they are the files which it *requires* to operate properly as a plugin, META-INF and MANIFEST.MF.
The comparison fails, so eclipse thinks they are different files and therefore your plugin project is invalid. If you rename these files to upper case, you’ll get a valid plugin again, until eclipse refreshes the file list, which obtains the new lower case filenames again and ***BAM***, your plugin again, is invalid.
The solution to this is thus, you must mount the FAT32 partition using shortname=mixed, you can either put this into your /etc/fstab, where it’ll use it automatically, or you can do what I did and install the parameter into the gconf options, so when it automounts, it’ll use the property. You can do that by following these instructions
- open the gconf editor (if you don’t have it installed, install it, then open it)
- you’ll find it in the system tools section of your Gnome desktop menu
- Navigate through the heirarchy of folders to:/system/storage/default_options/vfat
- On the right, you’ll see mount options, open it
- change the value of shortname=lower to shortname=mixed
- click accept
- close gconf
- Unmount and remount your FAT32 drives
Easy when you know how, huh?