mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 19:21:40 +09:00
Fix #397 error while uploading file to an existing directory
This commit is contained in:
parent
9e6e7efbfd
commit
45b2910cee
2 changed files with 6 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue