The call sites already have to know the magic nsIDirectoryService string in
your case, so I don't know what's worse.  Why would you want to limit such
a useful primitive to only apply to dirservice base paths, when there's
nothing inherent about the path computation that inherently so limits it?
Seems pretty arbitrary to me.

Also, your mechanism will require N getService calls in order to relativize
N files, whereas my mechanism can get by with but one (and possibly only
one getSpecialDir call, if they're all using the same base).

Mike

Reply via email to