From 3a1020135e48d5b6eacdab08358c88249650761c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Agneray?= <francois.agneray@lam.fr>
Date: Mon, 6 Dec 2021 15:13:49 +0100
Subject: [PATCH] Fixed bug archive action add is_file condition

---
 server/src/Action/ArchiveAction.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/src/Action/ArchiveAction.php b/server/src/Action/ArchiveAction.php
index a40045c1..0b43917b 100644
--- a/server/src/Action/ArchiveAction.php
+++ b/server/src/Action/ArchiveAction.php
@@ -151,7 +151,7 @@ final class ArchiveAction extends AbstractAction
             foreach ($attributesSelected as $attribute) {
                 $attributeLabel = $attribute->getLabel();
                 $filePath = $this->dataPath . $dataset->getFullDataPath() . DIRECTORY_SEPARATOR . $row[$attributeLabel];
-                if (file_exists($filePath)) {
+                if (file_exists($filePath) && is_file($filePath)) {
                     $zip->addFile($filePath, $row[$attributeLabel]);
                 }
             }
-- 
GitLab