6.0.0-beta1
11/9/25

[#2518] Missing leading slash in sqlhome VFS
Summary Missing leading slash in sqlhome VFS
Queue Gollem
Queue Version HEAD
Type Bug
State Not A Bug
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester rosenfeld (at) alum (dot) mit (dot) edu
Created 08/25/2005 (7381 days ago)
Due
Updated 08/26/2005 (7380 days ago)
Assigned 08/25/2005 (7381 days ago)
Resolved 08/26/2005 (7380 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
08/26/2005 11:47:42 AM rosenfeld (at) alum (dot) mit (dot) edu Comment #3 Reply to this comment
I didn't write a script, but here's the steps I followed.  This 
assumes that no one had uploaded a new file since the upgrade.



DELETE FROM horde_vfs WHERE LEFT(vfs_path, 1) <> '/'



UPDATE horde_vfs SET vfs_path = RIGHT(vfs_path, LENGTH(vfs_path) -1) 
WHERE LEFT(vfs_path, 1) = '/'



These queries worked on my table with ~100 entries.  I haven't tested 
them heavily and can't imagine how they'd work on foreign charsets or 
paths with escape sequences.  I know it's not much, but hopefully it's 
something.
08/26/2005 06:05:13 AM Michael Slusarz Comment #2
State ⇒ Not A Bug
Reply to this comment
you need to run an SQL query that removes the slash from all vfs_path 
entries that contain a slash at the beginning.  gollem was in beta 
until 1.0 and the way data was stored was changed before the first 
stable release came out - this is why no upgrade script has been 
provided.  it would be great if you could post any script you come up 
with.
08/25/2005 12:27:17 PM Jan Schneider Assigned to Michael Slusarz
State ⇒ Assigned
 
08/25/2005 11:41:53 AM rosenfeld (at) alum (dot) mit (dot) edu Comment #1
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Missing leading slash in sqlhome VFS
Queue ⇒ Gollem
Reply to this comment
I just synced to CVS head 8/18 (but still happens) and Gollem no 
longer shows the files it's holding.  My backends.php is below.   
Browsing the horde_vfs table

after uploading a new test file that did appear, I notice a change.



New entries in the vfs_path table have no leading slash, but the old

missing entries do.  For example, I have

old:  vfs_path = /home

new:  vfs_path = home



I also have some entries where vfs_path is empty, which I'm guessing is

from the recently corrected bug we read about on the list.  Can you 
help me correct the error so that my old documents display?





$backends['sqlhome'] = array(

     'name' => 'SQL Server with home',

     'driver' => 'sql',

     'preferred' => '',

     'hordeauth' => false,

     'params' => array_merge($GLOBALS['conf']['sql'], array('table' =>

'horde_vfs')),

     'loginparams' => array(),

     'attributes' => array('type', 'name', 'download', 'modified',

'size', 'permission', 'owner', 'group'),

     'root' => '/home',

     'home' => '/home/' . Auth::getAuth(),

     'createhome' => true

);

Saved Queries