mirror of
https://github.com/thewesker/twitter_ebooks.git
synced 2025-12-20 04:11:08 -05:00
Merge pull request #107 from ineffyble/master
Fixed bug where an empty corpus .json would cause archive command to fail
This commit is contained in:
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user