Correct bug #363
This commit is contained in:
parent
df4f59db8a
commit
d7ae9db463
@ -439,21 +439,10 @@ class Project extends CommonObject
|
||||
if ($conf->projet->dir_output)
|
||||
{
|
||||
$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))
|
||||
{
|
||||
$res = @dol_delete_dir($dir);
|
||||
$res = @dol_delete_dir_recursive($dir);
|
||||
if (!$res)
|
||||
{
|
||||
$this->error = 'ErrorFailToDeleteDir';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user