Skip to content

Conversation

@Codereamp
Copy link
Owner

For _directory bigger than 8 the result was always empty because there was no passing filePath to absPath

For _directory bigger than 8 the result was always empty because there was no passing filePath to absPath
@Codereamp
Copy link
Owner Author

Codereamp commented Apr 23, 2024

I'm afraid I'm not right with my small change. The non-working part was only about DIRECTORY_DOCUMENTS case (case 13). Cases (case 9 ...case 12) modify the abspath to be returned directly. So in order to do it right, it's necessary to change

                case 13:
                    if (Build.VERSION.SDK_INT < 19)
                        filePath = getMyEnvDir(Environment.DIRECTORY_DOWNLOADS, forcePubl);
                    else
                        filePath = getMyEnvDir(Environment.DIRECTORY_DOCUMENTS, forcePubl);
                    break;

into

                case 13:
                    if (Build.VERSION.SDK_INT < 19)
                        filePath = getMyEnvDir(Environment.DIRECTORY_DOWNLOADS, forcePubl);
                    else
                        filePath = getMyEnvDir(Environment.DIRECTORY_DOCUMENTS, forcePubl);
                    absPath = filePath;
                    break;

I'm not suggesting a new commit neither delete one in order to not produce a new bug or to confuse everybody. Apologies :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants