wa2c / cifs-documents-provider

CIFS Documents Provider
MIT License
294 stars 25 forks source link

Scanning files stuck at File Limit minus 1 on some apps. #49

Closed RebelliousX closed 1 year ago

RebelliousX commented 1 year ago

Hello @wa2c ,

Logcat_CIFS_DocProv.txt

When I scan for files using AetherSX2 or DuckStation emulators, the process will get stuck at the "File Limit - 1". In this case, I have the limit at 8. And it gets stuck at 7. I posted a video before about this in this commit . But this time, I was able to run CIFS Document Provider through Android Studio and provide some Logcat log. Any passwords has been removed from log obviously.

It seems due to some exceptions happening, the Queue added do not match the Queue removed? And the queue never reaches 0 after reading the file. Also not sure if it is normal for a file extension when querying child documents to change from ".iso" to "i00", maybe it is the intended behavior but I don't know.

Edit: I believe the issue started here ( I could be wrong, lol ). android.cifsdocumentsprovider E Writing exception to parcel java.lang.SecurityException: Document 192.168.4.32/Share/Games/PS2 is not a descendant of 192.168.4.32/Share/Games/PS2/

Because after that exception, the extension changed from ISO to i00. Notice the difference is a front slash at the end? (one is a directory and the other is a document? they are both directories though for the same path)

At the end of the log, the emulator is frozen trying to process the last file.

For me to bypass this issue, I have to increase the file limit to absurd number that is greater than the number of files to be scanned for these specific apps. It is not a critical issue, but it is annoying.

Hopefully you will find the Log useful.

RebelliousX commented 1 year ago

Fixed with #54 .. thanks @wa2c 👍