From df7de497f1f600a7a0d69760519f0b836f07ba37 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 1 Jan 2018 19:56:20 +0100 Subject: Ensure file does not exist when new one is added to DB Signed-off-by: Florian Pritz --- application/service/files.php | 1 + 1 file changed, 1 insertion(+) diff --git a/application/service/files.php b/application/service/files.php index 0b0c16978..85efdfff8 100644 --- a/application/service/files.php +++ b/application/service/files.php @@ -178,6 +178,7 @@ class files { )); $storage_id = $CI->db->insert_id(); $new_storage_id_created = true; + assert(!file_exists($CI->mfile->file($hash."-".$storage_id))); } $data_id = $hash."-".$storage_id; -- cgit v1.2.3-24-g4f1b