itinance / itinance/react-native-fs

Error when writeFile if the filename contains ':' like 'test:test.xls' in android

Open
#616 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
5k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

the main problem is uri.getScheme(),make the scheme of uri like '.../../test' but not 'file' or 'content',so it would lead an error 'ENOENT: no such file or directory, open ...' when ContentResolver execute the function openOutputStream because the scheme is not 'file' or 'content'.

the code is line 118 in com.rnfs.RNFSManager:
stream = reactContext.getContentResolver().openOutputStream(uri, append ? "wa" : "w");

so I suggest if we can get the outputStream like the funtion downloadFile,
stream = new FileOutputStream(path)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.