diff --git a/trigger.php b/trigger.php index 3de0538..979d54d 100644 --- a/trigger.php +++ b/trigger.php @@ -1,6 +1,5 @@ dirroot . '/backup/util/includes/backup_includes.php'); if (! function_exists('str_ends_with')) { function str_ends_with(string $haystack, string $needle): bool @@ -24,4 +23,6 @@ if (!has_capability('local/replication:replicate', $context)) { die("User not allowed to trigger replication!"); } -touch($directory . $id . "-" . $course->category . ".mew"); \ No newline at end of file +if (!touch($directory . $id . "-" . $course->category . ".mew")) { + die("Could not touch $directory$id-{$course->category}.mew"); +} \ No newline at end of file