#2936: Error creating folder 'dirname' {Can't create 'dirname' directory}
--------------------------+-------------------------------------------------
 Reporter:  SLX           |       Owner:                 
     Type:  Bug           |      Status:  new            
 Priority:  Normal        |   Milestone:                 
Component:  Server : PHP  |     Version:  FCKeditor 2.6.4
 Keywords:                |  
--------------------------+-------------------------------------------------
 If in "fckeditor\editor\filemanager\connectors\php\config.php" I set only
 one directory name above the root, ex.
 {{{
 $Config['UserFilesPath'] = '/userfiles/' ;
 }}}

 I can't do a quick upload a file. Message box say that:
 "Error creating folder 'userfiles' {Can't create '/userfiles/' directory}"

 By using more directories in the path, like:
 {{{
 $Config['UserFilesPath'] = '/userfiles/abc/' ;
 }}}
 the error doesn't show.

 I think this is a bug in the file
 "fckeditor\editor\filemanager\connectors\php\io.php":

 {{{
 101:    // Check if the parent exists, or create it.
 102:    if ( !file_exists( $sParent ) )
 103:    {
 104:            //prevents agains infinite loop when we can't create root
 folder
 }}}

 This will try to create a directory "" (empty string) if the config has
 one directory in the path, because the parent is root (/) and cannot be
 created. So I think it should be modified:

 {{{
 101:    // Check if the parent exists, or create it.
 102:    if ( '''!empty($sParent) &&''' !file_exists( $sParent ) )
 103:    {
 104:            //prevents agains infinite loop when we can't create root
 folder
 }}}

 After modification the files are uploaded correctly.

-- 
Ticket URL: <http://dev.fckeditor.net/ticket/2936>
FCKeditor <http://www.fckeditor.net/>
The text editor for Internet
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac

Reply via email to