[Verification] TCT pass rate: 100%
Change-Id: I4b3986bd249ad1ebc1459eb50525ddd7d1a0f5bd
Signed-off-by: Pawel Andruszkiewicz <p.andruszkie@samsung.com>
var aStatObj = native_.getResultObject(result);
var _result = commonFS_.getFileInfo(aStatObj, false, args.mode);
if (_result.readOnly && args.mode !== 'r') {
- throw new WebAPIException(WebAPIException.IO_ERR);
+ native_.callIfPossible(args.onerror, new WebAPIException(WebAPIException.IO_ERR, 'File is read-only.'));
} else {
native_.callIfPossible(args.onsuccess, new File(_result));
}