summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2018-01-01 19:56:20 +0100
committerFlorian Pritz <bluewind@xinu.at>2018-01-01 19:56:20 +0100
commitdf7de497f1f600a7a0d69760519f0b836f07ba37 (patch)
treef4c3fc90193a88f89752670f989efdd146ff94b8 /application
parente8bf42ea4b14764eafa5d67f903fecd33c6c5a38 (diff)
Ensure file does not exist when new one is added to DB
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application')
-rw-r--r--application/service/files.php1
1 files changed, 1 insertions, 0 deletions
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;