Skip to content
Snippets Groups Projects
Commit d7ae9db4 authored by Florian Henry's avatar Florian Henry Committed by Regis Houssin
Browse files

Correct bug #363

parent df4f59db
No related branches found
No related tags found
No related merge requests found
......@@ -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';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment