[haiku-development] Re: Changeset 26974 (cdda)

  • From: "Ithamar R. Adema" <ithamar@xxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 19 Aug 2008 20:42:29 +0200

Bruno Albuquerque wrote:
François Revol wrote:

But that's not a name issue, it's a file system issue, because the D2 filesystem is too dumb. There you need to have either invalid chars stripped, converted to plain latin, or encoded in some way (there are many). But it's an FS issue.
Where would you have this thing to put extensions back ?
In the VFS ? in each FS addon ?
What if you FTP the files off a BFS partitions to a linux box and they don't have the extension ? You'll end up with something unusable.

Although I understand what you mean, this is not really a valid concern. The same can happen with people trying to transfer, say, People files. They will lose all attributes and be basically unusable when you do that. But we still think extended attributes are a good idea.

You also risk of removing something which wasn't an extension (that is, was added intentionally), and adding back something wrong.

Well, the heuristic seems simple enough to me. You don't do anything when transferring a file to a files system that supports mime types (or attributes). But when you do it the other way around, you add an extension to the file if it does not have an extension that match its type. For example, a file called "Track 01" with a type of audio/x-wav would get a ".wav" extension appended to it (and we can do all that with what we already have as mime types can have a list of extensions associated with them).
This also opens up some other cool possibilities, like mapping People files onto vCard files....

/me quickly hides again... ;)

Ith.


Other related posts: