Fix #397 error while uploading file to an existing directory

This commit is contained in:
Kijin Sung 2016-03-21 16:18:31 +09:00
parent 9e6e7efbfd
commit 45b2910cee
2 changed files with 6 additions and 2 deletions

View file

@ -176,7 +176,8 @@ class FileHandler
{
if (!ini_get('safe_mode'))
{
return Rhymix\Framework\Storage::createDirectory(self::getRealPath($path_string));
$path = self::getRealPath($path_string);
return Rhymix\Framework\Storage::isDirectory($path) || Rhymix\Framework\Storage::createDirectory($path);
}
// if safe_mode is on, use FTP

View file

@ -763,7 +763,10 @@ class fileController extends file
}
// Create a directory
if(!FileHandler::makeDir($path)) return new Object(-1,'msg_not_permitted_create');
if(!Rhymix\Framework\Storage::isDirectory($path) && !Rhymix\Framework\Storage::createDirectory($path))
{
return new Object(-1,'msg_not_permitted_create');
}
// Move the file
if($manual_insert)