diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index ad23ecacaa7..b0ce3f76619 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -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';