Last Comment Bug 756503 - FileAPI doesn't update the files size when user makes file changes
: FileAPI doesn't update the files size when user makes file changes
Status: UNCONFIRMED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: 12 Branch
: x86_64 All
: -- normal with 1 vote (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on: 759416
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-18 10:22 PDT by trevor.m.senior
Modified: 2012-08-10 17:02 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description trevor.m.senior 2012-05-18 10:22:06 PDT
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19

Steps to reproduce:

I chose a file using the HTML5 FileAPI.

See this question I posted here: 

http://stackoverflow.com/questions/10646601/fileapi-doesnt-update-the-files-size-when-user-makes-file-changes-non-webkit-b

And The relating JSFiddle: http://jsfiddle.net/e2UfM/12/

JSFiddle Usage:

1. Load in a text file from your local machine.
2. Hit "load file".
3. Hit "display file size" - note the size.
4. modify & save the text file on your local machine.
5. Hit "display file size" again. Note how in webkit browsers (Chrome) the file size changes, but in   Firefox it didn't update the file size


Actual results:

After choosing the file, I displayed its file size. I then modified the file on the local machine, but when reading the file again the file size remains the same. 


Expected results:

Webkit browsers (Google Chrome) update the size of a file when users make changes to files locally, whereas this version of Firefox did not! This should be fixed to ensure that the file is the correct size on the client side, even if the user makes changes to their file.
Comment 1 Alex Vincent [:WeirdAl] 2012-08-10 10:03:56 PDT
Oh, I'd love to see (or even work on a fix for) this.  As I understand it, this would be done by asking the operating system to notify when a file changes. Mozilla's nsLocalFile*.cpp code has no code to support this as far as I know.
Comment 2 Blair McBride [:Unfocused] (UNAVAILABLE) 2012-08-10 17:01:58 PDT
(In reply to Alex Vincent [:WeirdAl] from comment #1)
> Mozilla's nsLocalFile*.cpp code has no code to support this as far
> as I know.

Bug 759416 is adding that.

Note You need to log in before you can comment on or make changes to this bug.