mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-10-17 05:22:23 +00:00
fix recursive removal and copying of dirs
This commit is contained in:
parent
790eef7e84
commit
1a61a6ca8f
|
@ -205,14 +205,14 @@ class SeedDMS_Core_File {
|
||||||
{
|
{
|
||||||
if ($entry == ".." || $entry == ".")
|
if ($entry == ".." || $entry == ".")
|
||||||
continue;
|
continue;
|
||||||
else if (is_dir($path . $entry))
|
else if (is_dir($path . DIRECTORY_SEPARATOR . $entry))
|
||||||
{
|
{
|
||||||
if (!self::removeDir($path . $entry . "/"))
|
if (!self::removeDir($path . DIRECTORY_SEPARATOR . $entry . "/"))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!@unlink($path . $entry))
|
if (!@unlink($path . DIRECTORY_SEPARATOR . $entry))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -232,10 +232,10 @@ class SeedDMS_Core_File {
|
||||||
if ($entry == ".." || $entry == ".")
|
if ($entry == ".." || $entry == ".")
|
||||||
continue;
|
continue;
|
||||||
else if (is_dir($sourcePath . $entry)) {
|
else if (is_dir($sourcePath . $entry)) {
|
||||||
if (!self::copyDir($sourcePath . $entry . "/", $targetPath . $entry . "/"))
|
if (!self::copyDir($sourcePath . DIRECTORY_SEPARATOR . $entry, $targetPath . DIRECTORY_SEPARATOR . $entry))
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
if (!@copy($sourcePath . $entry, $targetPath . $entry))
|
if (!@copy($sourcePath . DIRECTORY_SEPARATOR . $entry, $targetPath . DIRECTORY_SEPARATOR . $entry))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user