Summary | files in the root folder are stored with vfs_path NULL but viewed with vfs_path '' |
Queue | Horde Framework Packages |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | jan (at) horde (dot) org |
Requester | lehmann (at) ans-netz (dot) de |
Created | 12/20/2016 (3222 days ago) |
Due | |
Updated | 01/13/2017 (3198 days ago) |
Assigned | |
Resolved | 01/13/2017 (3198 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | Horde_Vfs 2.3.5 |
Patch | No |
State ⇒ Resolved
Milestone ⇒ Horde_Vfs 2.3.5
commit cc9d6db93df3f1779861b57619f761154089975f
Author: Jan Schneider <jan@horde.org>
Date: Fri Jan 13 18:27:07 2017 +0100
[jan] Fix retrieving files from root folder with SQL backends
(
Bug #14545).framework/Vfs/lib/Horde/Vfs/Sql.php | 13 +++++++++----
framework/Vfs/package.xml | 4 ++--
framework/Vfs/test/Horde/Vfs/FileTest.php | 5 +++++
framework/Vfs/test/Horde/Vfs/FtpTest.php | 5 +++++
framework/Vfs/test/Horde/Vfs/MongoTest.php | 5 +++++
framework/Vfs/test/Horde/Vfs/SmbTest.php | 5 +++++
framework/Vfs/test/Horde/Vfs/Sql/Base.php | 5 +++++
framework/Vfs/test/Horde/Vfs/SqlFile/Base.php | 5 +++++
framework/Vfs/test/Horde/Vfs/Ssh2Test.php | 5 +++++
framework/Vfs/test/Horde/Vfs/TestBase.php | 8 ++++++++
10 files changed, 54 insertions(+), 6 deletions(-)
http://github.com/horde/horde/commit/cc9d6db93df3f1779861b57619f761154089975f
Queue ⇒ Horde Framework Packages
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ files in the root folder are stored with vfs_path NULL but viewed with vfs_path ''
Queue ⇒ Gollem
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
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>