[gollem] relative paths

Chuck Hagenbuch chuck at horde.org
Thu May 8 18:10:06 PDT 2003


Quoting kevin mcgowan <clunis at umich.edu>:

> I agree with that completely, actually.  I think reaching into the
> middle of a path to find a tilde is pretty ridiculous/gross.  At the
> same time, though, I feel that getNativePath is the right place to do
> tilde expansion.  I'd be happy to change my mind on that if people who
> know the VFS stuff better disagree.

I think whatever knows about home directories should handle it. Right now,
that's Gollem. I would be fine with moving it into the VFS, though, in
which case you'd be right.

> Perhaps the relative paths patch could not prepend current working
> directory if the argument to the change directory command begins with a
> tilde ( maybe based on a configuration option )?  This puts tilde
> expansion in the file backend without breaking relative paths ( unless,
> of course, someone has a relative path that is supposed to begin with
> an actual tilde ).

How about this:

1. We move handling of the 'home' parameter from Gollem directly into the
VFS (all backends, respect it if it's there, don't do anything if it's
not).

2. In Gollem, don't prepend the current path if the passed-in path begins
with a ~.

3. In the VFS, if a 'home' is set and the path begins with a ~, expand it,
otherwise, do nothing (either passing it on to the FTP server, or letting
it fail on a file backend, or whatever. Actually, maybe we should make sure
to filter it out on a file backend...).

-chuck

--
Charles Hagenbuch, <chuck at horde.org>
The alligators were there, too, in a bathtub inside the house.


More information about the gollem mailing list