Skip to content

Commit 91ada5e

Browse files
authored
Merge pull request react-native-oh-library#7 from boafeng/sig
修复读取文件报错问题
2 parents 29c8c9e + d76f502 commit 91ada5e

File tree

4 files changed

+3
-3
lines changed

4 files changed

+3
-3
lines changed

harmony/fs.har

6.5 KB
Binary file not shown.

harmony/fs/oh-package.json5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-native-oh-tpl/react-native-fs",
3-
"version": "2.20.0-0.1.4",
3+
"version": "2.20.0-0.1.5",
44
"description": "Please describe the basic information.",
55
"main": "index.ets",
66
"types": "module",

harmony/fs/src/main/ets/FsTurboModule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ export class FsTurboModule extends TurboModule implements TM.ReactNativeFs.Spec
233233
// 读取文件内容
234234
readFile(path: string): Promise<string> {
235235
return new Promise((resolve, reject) => {
236-
let file = fs.openSync(path, fs.OpenMode.READ_WRITE);
236+
let file = fs.openSync(path);
237237
let arrayBuffer = new ArrayBuffer(4096);
238238
fs.read(file.fd, arrayBuffer, (err: BusinessError, readLen: number) => {
239239
if (err) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-native-oh-tpl/react-native-fs",
3-
"version": "2.20.0-0.1.4",
3+
"version": "2.20.0-0.1.5",
44
"description": "Native filesystem access for react-native",
55
"main": "FS.common.js",
66
"typings": "index.d.ts",

0 commit comments

Comments
 (0)