[Zope] LocalFS and relative paths

Ayhan Ergul ergul@ccs.neu.edu
Wed, 14 Feb 2001 14:46:20 -0500 (EST)


I don't know much about Zope internals (yeah, I'm one of those coming
from the reverse direction: Zope first, python later!). However,
$INSTANCE_HOME/var/LocalFS would make it all I'll ever ask for. I'd be
careful about using any environment variable though, due to unintended
security holes that it may open. But, probably this is a moot issue given
that you can specify any zope-user-readable path currently ;-) 

Ayhan

On Wed, 14 Feb 2001, Jonothan Farr wrote:
> That's an interesting feature request. I believe it is currently possible to use
> relative base paths, but where would it be relative to? Whatever the current
> directory happens to be at the time the request is made, no doubt. As long as
> you can assume it's the directory you started the server from you're fine, but
> if any other products go messing around with the cwd then you're hosed.
> 
> So my question is, where *should* relative paths be relative to? $INSTANCE_HOME?
> 
> Another idea is that I could do an os.path.expandvars() and maybe even an
> os.path.expanduser() on the path, then you could put $HOME, $INSTANCE_HOME, or
> whatever environment variables you wanted into your base path.
> 
> --jfarr
> 
> ----- Original Message -----
> From: "Ayhan Ergul" <ergul@ccs.neu.edu>
> To: <zope@zope.org>
> Sent: Tuesday, February 13, 2001 12:16 PM
> Subject: [Zope] LocalFS and relative paths
> 
> 
> > LocalFS is a very useful product, thanks to Jonathan. I'm wondering if
> > it's possible to specify a relative path in LocalFS, e.g. specifying
> > 'images' as ID and 'projectXYZ/images/' as basepath would mount sth like
> > '($INSTANCE_HOME)/var/LocalFS/projectXYZ/images'?
> >
> > This would simplify moving LocalFS-enabled sites from one machine to
> > another that don't have the same directory structure if you like to keep
> > your stuff under the Zope tree, rather than at fixed paths. Currently, I
> > delete LocalFS objects and recreate them when I move a site.
> >
> > Ayhan
> >
> > PS: Make this question a feature request if not currently available.
> >
> >
> > _______________________________________________
> > Zope maillist  -  Zope@zope.org
> > http://lists.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope-dev )
> >
> >
> 

Ayhan Ergul <ergul@acm.org>