|
@@ -117,6 +117,7 @@ class File extends SplFileObject
|
|
*/
|
|
*/
|
|
protected function checkPath($path)
|
|
protected function checkPath($path)
|
|
{
|
|
{
|
|
|
|
+
|
|
if (is_dir($path)) {
|
|
if (is_dir($path)) {
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
@@ -308,7 +309,6 @@ class File extends SplFileObject
|
|
// 文件保存命名规则
|
|
// 文件保存命名规则
|
|
$saveName = $this->buildSaveName($savename);
|
|
$saveName = $this->buildSaveName($savename);
|
|
$filename = $path . $saveName;
|
|
$filename = $path . $saveName;
|
|
-
|
|
|
|
// 检测目录
|
|
// 检测目录
|
|
if (false === $this->checkPath(dirname($filename))) {
|
|
if (false === $this->checkPath(dirname($filename))) {
|
|
return false;
|
|
return false;
|