Merge pull request #3737 from frederic34/patch-15

Bad chmod for directory when changing product ref
This commit is contained in:
Laurent Destailleur 2015-10-18 20:28:17 +02:00
commit 4dc88406ac

View File

@ -765,8 +765,10 @@ class Product extends CommonObject
$newdir = $conf->product->dir_output . "/" . dol_sanitizeFileName($this->ref);
if (file_exists($olddir))
{
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
$res=dol_move($olddir, $newdir);
//include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
//$res = dol_move($olddir, $newdir);
// do not use dol_move with directory
$res = @rename($olddir, $newdir);
if (! $res)
{
$this->error='ErrorFailToMoveDir';