Merge pull request #3737 from frederic34/patch-15
Bad chmod for directory when changing product ref
This commit is contained in:
commit
4dc88406ac
@ -765,8 +765,10 @@ class Product extends CommonObject
|
|||||||
$newdir = $conf->product->dir_output . "/" . dol_sanitizeFileName($this->ref);
|
$newdir = $conf->product->dir_output . "/" . dol_sanitizeFileName($this->ref);
|
||||||
if (file_exists($olddir))
|
if (file_exists($olddir))
|
||||||
{
|
{
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
//include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
||||||
$res=dol_move($olddir, $newdir);
|
//$res = dol_move($olddir, $newdir);
|
||||||
|
// do not use dol_move with directory
|
||||||
|
$res = @rename($olddir, $newdir);
|
||||||
if (! $res)
|
if (! $res)
|
||||||
{
|
{
|
||||||
$this->error='ErrorFailToMoveDir';
|
$this->error='ErrorFailToMoveDir';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user