diff --git a/core/imageboard.pack.php b/core/imageboard.pack.php index 249b1b2f..0b2c89b8 100644 --- a/core/imageboard.pack.php +++ b/core/imageboard.pack.php @@ -972,7 +972,8 @@ function move_upload_to_archive($event) { $target = warehouse_path("images", $event->hash); if(!file_exists(dirname($target))) mkdir(dirname($target), 0755, true); if(!@copy($event->tmpname, $target)) { - throw new UploadException("Failed to copy file from uploads ({$event->tmpname}) to archive ($target)"); + $errors = error_get_last(); // note: requires php 5.2 + throw new UploadException("Failed to copy file from uploads ({$event->tmpname}) to archive ($target): {$errors['type']} / {$errors['message']}"); return false; } return true;