[Title] Revert - Make FileWriter writes from current position and change failure condition
[Issue#] N/A
[Problem]
[Cause]
[Solution]
Change-Id: I14f79c57f25a4667a7cc164a61b3f10d8c106ad2
return;
}
- seekFile(handle, position, SeekFromBeginning);
RefPtr<BlobStorageData> blobStorage = static_cast<BlobRegistryImpl&>(blobRegistry()).getBlobDataFromURL(data->url());
if (blobStorage) {
for (size_t i = 0; i < blobStorage->items().size(); i++) {
bytesWritten = 0;
bytesWritten = writeToFile(handle, blobItem.data->data(), blobItem.data->length());
- if (bytesWritten != blobItem.data->length()) {
+ if (bytesWritten < 0)
helperClient->didFail(FileError::SECURITY_ERR);
else
helperClient->didWrite(bytesWritten, (i + 1 == blobStorage->items().size()) ? true : false);