Skip to content

Commit 8d946ec

Browse files
authored
fix:修复使用exists()检测文件是否存在是当文件不存在时没有返回值 (react-native-oh-library#40)
1 parent e8d325e commit 8d946ec

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

harmony/blobUtil/src/main/ets/ReactNativeBlobUtil/ReactNativeBlobUtilFS.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ export default class ReactNativeBlobUtilFS {
253253
return new Promise((resolve, reject) => {
254254
fs.stat(path, (err: BusinessError, res: fs.Stat) => {
255255
if (err) {
256+
callback(false, false);
256257
reject('File does not exist');
257258
} else {
258259
fs.access(path, (err: BusinessError, result: boolean) => {

0 commit comments

Comments
 (0)