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

For problem reports, and discussions about the CMSMS 2.2 beta.

This board will be locked once CMSMS 2.2 is officially released.
Locked
esmiran

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

Post 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
User avatar
Rolf
Dev Team Member
Dev Team Member
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

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

Post 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
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

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

Post by calguy1000 »

Fixed in svn. thanks
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
Rolf
Dev Team Member
Dev Team Member
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

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

Post by Rolf »

Confirmed fixed
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Locked

Return to “[locked] CMSMS 2.2 Beta”