Closed jongkb closed 5 years ago
I added ability to sanitize file name. Plugin version 1.2.0
will automatically replace all /
symbols to _
. If you find any other invalid symbol, you can provide it to plugin via invalidFileNameSymbols
parameter.
Thanks for the fix! Works great now.
I discovered an edge case where opening a file from Google Drive may cause the plugin to crash. I believe this has to do with filename characters which are valid on the Drive platform but invalid on the local platform.
Repro steps: (Android)
Create/upload/rename a file on Google Drive with filename containing at least an Android filename reserved character. For example:
Report_2018/12/08.txt
(/
being the offending character on Android but valid on Drive)Open the document using the plugin from a Flutter app. App crashes with
java.lang.RuntimeException: An error occurred while executing doInBackground()
...
Caused by: java.io.FileNotFoundException: /data/user/0/com.example.myapp/cache/Report_2018/12/08.txt (No such file or directory)
Expected behavior: Plugin should return a sanitized path after opening the document.
Thanks in advance and keep up the good work.