Permalink
Browse files

Bugfix in the broke.fs.File.read method. As a side effect now both th…

…e length and position argiments are optional
  • Loading branch information...
1 parent f65bd2e commit 0057049e1dab4a1c42615607a822396e538746f8 unknown committed Sep 2, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 source/fs/fs.js
View
@@ -315,7 +315,8 @@
instance= this
,reader= new FileReader()
,pos= ((position === undefined) || (position === null)) ? this._offset : position
- ,blob= this._slice.call(this._file, pos, length)
+ ,endpos= ((length === undefined) || (length === null)) ? this._file.size : (pos + length)
+ ,blob= this._slice.call(this._file, pos, endpos)
;
reader.onload= function(event){

0 comments on commit 0057049

Please sign in to comment.