if necessary
This commit is contained in:
parent
20edd68093
commit
7efc4a0dfe
1 changed files with 1 additions and 1 deletions
|
@ -949,7 +949,7 @@ class Tag {
|
||||||
*/
|
*/
|
||||||
function move_upload_to_archive($event) {
|
function move_upload_to_archive($event) {
|
||||||
$target = warehouse_path("images", $event->hash);
|
$target = warehouse_path("images", $event->hash);
|
||||||
mkdir(dirname($target), 0755, true);
|
if(!file_exists(dirname($target))) mkdir(dirname($target), 0755, true);
|
||||||
if(!@copy($event->tmpname, $target)) {
|
if(!@copy($event->tmpname, $target)) {
|
||||||
throw new UploadException("Failed to copy file from uploads ({$event->tmpname}) to archive ($target)");
|
throw new UploadException("Failed to copy file from uploads ({$event->tmpname}) to archive ($target)");
|
||||||
return false;
|
return false;
|
||||||
|
|
Reference in a new issue