Project

General

Profile

Bug #579

The method FileManager::mkdirs() does not look well

Added by Ivan Tcholakov over 9 years ago. Updated about 9 years ago.

Status:
Bug resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
06/02/2010
Due date:
% Done:

90%

Estimated time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

While working on Feature #576, I noticed some unusual code in .../chamilo/main/inc/lib/fileManage.lib.php, it is inside the FileManager class:

    function mkdirs($path, $mode = '0770')
    {
        if (file_exists($path))
        {
            return false;
        }
        else
        {
            FileManager :: mkdirs(dirname($path), $mode);
             //mkdir($path, $mode);
            return true;
        }
    }

This method does not create directories at all. Without being 100% sure, I think that infinite recursion is possible in some circumstances.

History

#1

Updated by Yannick Warnier over 9 years ago

  • Target version set to 1.8.7 RC1
#2

Updated by Julio Montoya about 9 years ago

  • Target version changed from 1.8.7 RC1 to 1.8.7
#3

Updated by Yannick Warnier about 9 years ago

  • Status changed from New to Assigned
  • Assignee set to Julio Montoya
#4

Updated by Julio Montoya about 9 years ago

  • % Done changed from 0 to 10

This function is only called in inc/lib/groupmanager.lib.php +398

#5

Updated by Julio Montoya about 9 years ago

  • % Done changed from 10 to 30

I found more bugs when deleting a group ... thanks to reading that code (mkdirs).
This function mkdirs, should not be used when deleting a group... is useless.

#6

Updated by Julio Montoya about 9 years ago

Making mkdirs deprecated.

Cant push, Project Hosting is currently READ-ONLY for network maintenance.

#7

Updated by Julio Montoya about 9 years ago

  • Status changed from Assigned to Bug resolved
  • % Done changed from 30 to 90

We can close this task since the function is not called in all chamilo...
You are free to reopen...

http://code.google.com/p/chamilo/source/detail?r=3f134df98977fa4153cb0de3246078d11eb59ab7&repo=classic

Also available in: Atom PDF