if necessary
This commit is contained in:
		
							parent
							
								
									bbdfc1fa89
								
							
						
					
					
						commit
						30779e0afc
					
				@ -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;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user