Update product.class.php

This commit is contained in:
Frédéric FRANCE 2015-10-14 22:28:03 +02:00
parent f4cbc81c97
commit 3638f17d75

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, '0775');
//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';