[Zope] LocalFS and relative paths

Jonothan Farr jfarr@real.com
Wed, 14 Feb 2001 10:54:45 -0800


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 )
>
>