diff --git a/lib/Alchemy/Phrasea/Border/File.php b/lib/Alchemy/Phrasea/Border/File.php index f05e62a7e7..fab6ff7fd2 100644 --- a/lib/Alchemy/Phrasea/Border/File.php +++ b/lib/Alchemy/Phrasea/Border/File.php @@ -143,6 +143,7 @@ class File * PHPExiftool throws exception on some files not supported */ try { + $this->app['exiftool.writer']->reset(); $this->app['exiftool.writer']->write($this->getFile()->getRealPath(), $metadatas); } catch (PHPExiftoolException $e) { diff --git a/lib/classes/task/period/writemeta.php b/lib/classes/task/period/writemeta.php index 14f5e21f98..159e25fe3a 100644 --- a/lib/classes/task/period/writemeta.php +++ b/lib/classes/task/period/writemeta.php @@ -303,9 +303,10 @@ class task_period_writemeta extends task_databoxAbstract ); } + $this->dependencyContainer['exiftool.writer']->reset(); foreach ($tsub as $name => $file) { - $this->dependencyContainer['exiftool.writer']->erase($name != 'document' || $this->clear_doc); + $this->dependencyContainer['exiftool.writer']->erase($name != 'document' || $this->clear_doc, true); try { $this->dependencyContainer['exiftool.writer']->write($file, $metadatas);