FIX Do not delete files into sym links
This commit is contained in:
parent
083cb33a6c
commit
b9511fd4c6
@ -672,7 +672,7 @@ function dol_copy($srcfile, $destfile, $newmask=0, $overwriteifexists=1)
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy a dir to another dir.
|
||||
* Copy a dir to another dir. This include recursive subdirectories.
|
||||
*
|
||||
* @param string $srcfile Source file (a directory)
|
||||
* @param string $destfile Destination file (a directory)
|
||||
@ -716,7 +716,7 @@ function dolCopyDir($srcfile, $destfile, $newmask, $overwriteifexists, $arrayrep
|
||||
{
|
||||
if ($file!="." && $file!="..")
|
||||
{
|
||||
if (is_dir($ossrcfile."/".$file))
|
||||
if (is_dir($ossrcfile."/".$file) && ! is_link($ossrcfile."/".$file))
|
||||
{
|
||||
//var_dump("xxx dolCopyDir $srcfile/$file, $destfile/$file, $newmask, $overwriteifexists");
|
||||
$tmpresult=dolCopyDir($srcfile."/".$file, $destfile."/".$file, $newmask, $overwriteifexists, $arrayreplacement);
|
||||
@ -1239,7 +1239,7 @@ function dol_delete_dir_recursive($dir, $count=0, $nophperrors=0, $onlysub=0, &$
|
||||
|
||||
if ($item != "." && $item != "..")
|
||||
{
|
||||
if (is_dir(dol_osencode("$dir/$item")))
|
||||
if (is_dir(dol_osencode("$dir/$item")) && ! is_link(dol_osencode("$dir/$item")))
|
||||
{
|
||||
$count=dol_delete_dir_recursive("$dir/$item", $count, $nophperrors, 0, $countdeleted);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user