Page 1 of 1

[fixed]File Picker can't access a folder with a "-" in name

Posted: Fri Apr 07, 2017 8:38 pm
by esmiran
To repeat the error:
Admin - Content Manager - edit any content page - click on the Insert/edit image
- create a folder named "AC-DC", and then try to enter into.
You'll get this error:

Code: Select all

Fatal error: Uncaught exception 'LogicException' with message 'Invalid path_a passed to FilePicker\PathAssistant::to_relative_sub: ' in /var/www/cms2/modules/FilePicker/lib/class.PathAssistant.php:40 Stack trace: #0 /var/www/cms2/modules/FilePicker/lib/class.PathAssistant.php(71): FilePicker\PathAssistant->to_relative_sub('/var/www/cms2/u...', '/var/www/cms2/u...') #1 /var/www/cms2/modules/FilePicker/action.filepicker.php(64): FilePicker\PathAssistant->to_relative('/var/www/cms2/u...') #2 /var/www/cms2/lib/classes/class.CMSModule.php(1415): include('/var/www/cms2/m...') #3 /var/www/cms2/lib/classes/class.CMSModule.php(1489): CMSModule->DoAction('filepicker', 'm1_', Array, '') #4 /var/www/cms2/admin/moduleinterface.php(110): CMSModule->DoActionBase('filepicker', 'm1_', Array, '', Object(Smarty_CMS)) #5 {main} thrown in /var/www/cms2/modules/FilePicker/lib/class.PathAssistant.php on line 40

Re: File Picker can't access a folder with a "-" in name

Posted: Sat Apr 08, 2017 9:42 am
by Rolf
Confirmed in SVN rev. 11211

Quick test:
Line 38 returns D:\www\trunk\uploads instead of D:\www\trunk\uploads\foo-bar

Code: Select all

$path_a = realpath( $path_a ); echo $path_a;
Works for foobar and foo_bar, but not foo-bar

Re: [confmd]File Picker can't access a folder with a "-" in

Posted: Sat Apr 08, 2017 6:09 pm
by calguy1000
Fixed in svn. thanks

Re: [fixed]File Picker can't access a folder with a "-" in n

Posted: Fri Apr 21, 2017 1:47 pm
by Rolf
Confirmed fixed