mirror of
https://github.com/status-im/react-native-image-crop-picker.git
synced 2025-02-22 10:28:23 +00:00
Fix a bug when the file name contains slashes. (#775)
It can happen when selecting an image downloaded from Weibo app.
This commit is contained in:
parent
0e6f877f27
commit
9ce13581da
@ -103,6 +103,7 @@ class RealPathUtil {
|
||||
private static File writeToFile(Context context, String fileName, Uri uri) {
|
||||
String tmpDir = context.getCacheDir() + "/react-native-image-crop-picker";
|
||||
Boolean created = new File(tmpDir).mkdir();
|
||||
fileName = fileName.substring(fileName.lastIndexOf('/') + 1);
|
||||
File path = new File(tmpDir);
|
||||
File file = new File(path, fileName);
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user