make sure we read the whole file
git-svn-id: file:///home/svn/framework3/trunk@10234 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
b24a7db785
commit
e42d2c1ef4
|
@ -163,7 +163,7 @@ end
|
|||
def extract_words(wordfile)
|
||||
return [] unless wordfile && File.readable?(wordfile)
|
||||
begin
|
||||
words = File.open(wordfile) {|f| f.read}
|
||||
words = File.open(wordfile) {|f| f.read(f.stat.size)}
|
||||
rescue
|
||||
return
|
||||
end
|
||||
|
@ -175,7 +175,7 @@ def extract_word_pair(wordfile)
|
|||
return [] unless wordfile && File.readable?(wordfile)
|
||||
creds = []
|
||||
begin
|
||||
upfile_contents = File.open(wordfile) {|f| f.read}
|
||||
upfile_contents = File.open(wordfile) {|f| f.read(f.stat.size)}
|
||||
rescue
|
||||
return []
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue