[Tickets #14545] files in the root folder are stored with vfs_path NULL but viewed with vfs_path ''

noreply at bugs.horde.org noreply at bugs.horde.org
Tue Dec 20 13:03:19 UTC 2016


BITTE NICHT AUF DIESE NACHRICHT ANTWORTEN. NACHRICHTEN AN DIESE  
E-MAIL-ADRESSE WERDEN NICHT GELESEN.

Ticket-URL: https://bugs.horde.org/ticket/14545
------------------------------------------------------------------------------
  Ticket           | 14545
  Erstellt Von     | lehmann at ans-netz.de
  Zusammenfassung  | files in the root folder are stored with vfs_path NULL
                   | but viewed with vfs_path ''
  Warteschlange    | Gollem
  Version          | Git master
  Typ              | Bug
  Status           | Unconfirmed
  Priorität        | 1. Low
  Milestone        |
  Patch            |
  Zuständige       |
------------------------------------------------------------------------------


lehmann at ans-netz.de (2016-12-20 13:03) hat geschrieben:

The files which are placed into the root folder are stored with  
vfs_path = NULL. This is important because the directory listing of  
the root folder is made with "WHERE vfs_path IS NULL". (See SQLs below)

The problem is now, that files stored in the root folder can not be  
viewed, because '/' is specified as path in gollems view.php when  
accessing the file.
Vfs.php trimms itself the leading slash '/' so we now got a path ''  
whis is used for quering the file in horde_vfs.

But - '' s not NULL - so - the file contents can not be shown because  
the SELECT does not find any matching row.

issued SQL to see folder contents:

SELECT vfs_name, vfs_type, LENGTH(vfs_data) length, vfs_modified,  
vfs_owner FROM horde_vfs WHERE vfs_path IS NULL


issued SQL to view a specific file from the root folder:

  SELECT vfs_data FROM horde_vfs WHERE vfs_path = '' AND vfs_name = 'dsl.pdf'


But it is stored like this:

mysql> select vfs_path,vfs_name from horde_vfs where vfs_name = 'dsl.pdf'\G
*************************** 1. row ***************************
vfs_path: NULL
vfs_name: dsl.pdf
1 row in set (0.01 sec)

mysql>






More information about the bugs mailing list