Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
ac3a270e
Commit
ac3a270e
authored
7 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
FIX Do not delete files into sym links
Conflicts: htdocs/core/lib/files.lib.php
parent
aeba02fb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/core/lib/files.lib.php
+5
-4
5 additions, 4 deletions
htdocs/core/lib/files.lib.php
with
5 additions
and
4 deletions
htdocs/core/lib/files.lib.php
+
5
−
4
View file @
ac3a270e
...
...
@@ -588,7 +588,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)
...
...
@@ -632,7 +632,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
);
...
...
@@ -999,7 +999,8 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable
}
/**
* Remove a file or several files with a mask
* Remove a file or several files with a mask.
* This delete file physically but also database indexes.
*
* @param string $file File to delete or mask of files to delete
* @param int $disableglob Disable usage of glob like * so function is an exact delete function that will return error if no file found
...
...
@@ -1154,7 +1155,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
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment