Correct bug #363
This commit is contained in:
parent
25640853f5
commit
3abffac52a
@ -439,21 +439,10 @@ class Project extends CommonObject
|
|||||||
if ($conf->projet->dir_output)
|
if ($conf->projet->dir_output)
|
||||||
{
|
{
|
||||||
$dir = $conf->projet->dir_output . "/" . $projectref;
|
$dir = $conf->projet->dir_output . "/" . $projectref;
|
||||||
$file = $conf->projet->dir_output . "/" . $projectref . "/" . $projectref . ".pdf";
|
|
||||||
if (file_exists($file))
|
|
||||||
{
|
|
||||||
dol_delete_preview($this);
|
|
||||||
|
|
||||||
if (!dol_delete_file($file))
|
|
||||||
{
|
|
||||||
$this->error = 'ErrorFailToDeleteFile';
|
|
||||||
$this->db->rollback();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (file_exists($dir))
|
if (file_exists($dir))
|
||||||
{
|
{
|
||||||
$res = @dol_delete_dir($dir);
|
$res = @dol_delete_dir_recursive($dir);
|
||||||
if (!$res)
|
if (!$res)
|
||||||
{
|
{
|
||||||
$this->error = 'ErrorFailToDeleteDir';
|
$this->error = 'ErrorFailToDeleteDir';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user