fileSystemProvider example generates a file of infinite length when copied |
|||||
Issue descriptionChrome Version: 61.0.3115.0 OS: ChromeOS What steps will reproduce the problem? (1) Install fileSystemProvider example extension from https://codesearch.chromium.org/chromium/src/chrome/common/extensions/docs/examples/api/fileSystemProvider/basic/ (2) Open FilesApp -> Add new services -> Sample File System (3) Copy file1.txt in the Sample File System to Downloads directory. What is the expected result? FilesApp should recognize the end of the virtual file and generate a file of finite length. What happens instead? FilesApp did not recognize the end of the file and generated a file of infinite length with repeated content.
,
May 29 2017
Thanks for filing a bug. The example is wrong, as it doesn't take into account the offset.
,
May 29 2017
Thank you for taking a look. Just out of curiosity, I thought the extension should work as is because has_more argument of onReadFileRequested's onSuccess is set to false. Is the behavior of caller side expected?
,
May 29 2017
hasMore doesn't mean that it's the end of the file. It only means that no more bytes will be returned for the request. I agree that the documentation is not clear here.
,
May 29 2017
Oh, I understand that. Thank you for your help.
,
May 29 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d0ee74f331d96323941af0cee83a2c789ad847be commit d0ee74f331d96323941af0cee83a2c789ad847be Author: tetsui <tetsui@chromium.org> Date: Mon May 29 07:42:03 2017 Take into account options.offset in onReadFileRequested. fileSystemProvider example extension did not take into account options.offset in onReadFileRequested, which resulted in generating a file of infinite length when the file is copied. BUG= 727207 TBR=rdevlin.cronin@chromium.org Review-Url: https://codereview.chromium.org/2906283002 Cr-Commit-Position: refs/heads/master@{#475305} [modify] https://crrev.com/d0ee74f331d96323941af0cee83a2c789ad847be/chrome/common/extensions/docs/examples/api/fileSystemProvider/basic/background.js
,
May 29 2017
,
Aug 1 2017
,
Jan 22 2018
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by tetsui@chromium.org
, May 29 2017