From af968c1906680d8ac5c9aecb8f72d382f0855183 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Carretero?=
 <frederic.carretero@veremes.com>
Date: Thu, 6 Dec 2018 11:39:29 +0100
Subject: [PATCH] Correction dans la classe "File_downloader"

---
 vas/rest/ws/vitis/File_downloader.class.inc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/vas/rest/ws/vitis/File_downloader.class.inc b/vas/rest/ws/vitis/File_downloader.class.inc
index 2fab279f..16451128 100644
--- a/vas/rest/ws/vitis/File_downloader.class.inc
+++ b/vas/rest/ws/vitis/File_downloader.class.inc
@@ -128,7 +128,10 @@ class File_downloader extends Vitis {
 
           } else {
             // modification de $sPath pour aller chercher le fichier dans ws_data
-            $sPath = $this->aProperties["ws_data_dir"] . "/" . $this->aValues["key"];
+            if (strpos($this->aValues["key"], 'ws_data') === 0)
+              $sPath = str_replace('ws_data', $this->aProperties['ws_data_dir'], $this->aValues["key"]);
+            else
+              $sPath = $this->aProperties["ws_data_dir"] . "/" . $this->aValues["key"];
             // check eTag
             $sEtag = sha1(file_get_contents($sPath), false);
 
-- 
GitLab