Fixed bug where an empty corpus .json would cause archive command to fail
This commit is contained in:
		
							parent
							
								
									36a64736bf
								
							
						
					
					
						commit
						55143feed4
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -49,7 +49,7 @@ module Ebooks | |||
| 
 | ||||
|       @client = client || make_client | ||||
| 
 | ||||
|       if File.exists?(@path) | ||||
|       if (File.exists?(@path) && !File.zero?(@path)) | ||||
|         @filetext = File.read(@path, :encoding => 'utf-8') | ||||
|         @tweets = JSON.parse(@filetext, symbolize_names: true) | ||||
|         log "Currently #{@tweets.length} tweets for #{@username}" | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Effy Elden
						Effy Elden