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

@ -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)