[gollem] relative paths

Liam Hoekenga liamr at umich.edu
Thu May 8 11:50:12 PDT 2003


> I'm not sure that this should be done in the backend. Try what I just
> committed.

Seems to work.  It breaks our first pass at tilde expansion, but we'll
take another crack on that.  We're guessing that that (tilde expansion)
should probably happen in the VFS backend...

Anyways.. We should probably use the DIRECTORY_SEPARATOR constant in
manager.php instead of a forward slash.. it being platform specific and
all.  Try what I've attached.

Liam
-------------- next part --------------
Index: manager.php
===================================================================
RCS file: /repository/gollem/manager.php,v
retrieving revision 1.71
diff -U2 -r1.71 manager.php
--- manager.php 7 May 2003 18:06:51 -0000       1.71
+++ manager.php 8 May 2003 14:46:57 -0000
@@ -55,8 +55,8 @@
 case GOLLEM_CHANGE_DIRECTORY:
     if ($dir = Horde::getFormData('change_directory')) {
-        if (substr($dir, 0, 1) == '/') {
+        if (substr($dir, 0, 1) == DIRECTORY_SEPARATOR ) {
             $result = Gollem::setDir($dir, $backend_key);
         } else {
-            $result = Gollem::setDir(Gollem::getDir($backend_key) . '/' . $dir, $backend_key);
+            $result = Gollem::setDir(Gollem::getDir($backend_key) . DIRECTORY_SEPARATOR . $dir, $backend_key);
         }
         if (is_a($result, 'PEAR_Error')) {


More information about the gollem mailing list