You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/09/01 09:19:23 UTC

[GitHub] [cordova-plugin-file] breautek opened a new pull request #487: feat: Request external permission when listing external directories

breautek opened a new pull request #487:
URL: https://github.com/apache/cordova-plugin-file/pull/487


   <!--
   Please make sure the checklist boxes are all checked before submitting the PR. The checklist is intended as a quick reference, for complete details please see our Contributor Guidelines:
   
   http://cordova.apache.org/contribute/contribute_guidelines.html
   
   Thanks!
   -->
   
   ### Platforms affected
   Android
   
   
   ### Motivation and Context
   <!-- Why is this change required? What problem does it solve? -->
   <!-- If it fixes an open issue, please link to the issue here. -->
   
   Progresses https://github.com/apache/cordova-plugin-file/issues/426 but unsure if it completely resolves it
   
   ### Description
   <!-- Describe your changes in detail -->
   
   Code changes includes checking to see the file path on reading directory listings (for listing directories and files) and if the file path happens to be an "external" file path, then assert/request READ_EXTERNAL_STORAGE permission.
   
   There have been a couple of documentation changes as well, including the fact that some directories that were previously writable in earlier API versions are no longer writable starting in API 30.
   
   `requestLegacyExternalStorage` flag is removed because that was an API 29 only flag. This flag is not honoured on API 30 and is forcefully false.
   
   ### Testing
   <!-- Please describe in detail how you tested your changes. -->
   
   Npm test and manual testing using a test app: https://github.com/breautek/cordova-file-api30-test-app
   
   I'm not sure if my test app is an exhaustive list, but the basic directory listing, reading and writing all appear to work properly assuming the app has the READ/WRITE_EXTERNAL_STORAGE permission granted.
   
   CDVFILE urls however don't quite work as expected and is not covered in this PR. If a cdvfile url leads to an external directory source and the app does not have the proper permissions, the webview does not wait for the permission response and the request will fail. From what I can tell, cdvfile-based urls do work if the app already has the permission granted.
   
   ### Checklist
   
   - [x] I've run the tests to see all new and existing tests pass
   - [x] I added automated test coverage as appropriate for this change
   - [x] Commit is prefixed with `(platform)` if this change only applies to one platform (e.g. `(android)`)
   - [x] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct [keyword to close issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/))
   - [x] I've updated the documentation if necessary
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-file] breautek merged pull request #487: feat: Request external permission when listing external directories

Posted by GitBox <gi...@apache.org>.
breautek merged pull request #487:
URL: https://github.com/apache/cordova-plugin-file/pull/487


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-file] breautek commented on pull request #487: feat: Request external permission when listing external directories

Posted by GitBox <gi...@apache.org>.
breautek commented on pull request #487:
URL: https://github.com/apache/cordova-plugin-file/pull/487#issuecomment-1070905572


   > Is this still going to merge sometime @breautek ? smile_cat
   
   I suppose it's been well over 24 hours without objections. :smile: 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-file] breautek merged pull request #487: feat: Request external permission when listing external directories

Posted by GitBox <gi...@apache.org>.
breautek merged pull request #487:
URL: https://github.com/apache/cordova-plugin-file/pull/487


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-file] breautek commented on pull request #487: feat: Request external permission when listing external directories

Posted by GitBox <gi...@apache.org>.
breautek commented on pull request #487:
URL: https://github.com/apache/cordova-plugin-file/pull/487#issuecomment-967114246


   Thanks for the review.
   
   iOS is failing because of 
   
   > resolveLocalFileSystemURL on cdvfile://
           ✗ file.spec.147 should be able to resolve cdvfile applicationDirectory fs root
             - Expected [object Event] not to be defined.
             
         
   This test case was failing since WKWebView was enforced, when cordova-ios@6 was released. So I don't consider this a blocker.
   
   Android is failing because of
   
   > Failed to install 'cordova-plugin-paramedic': Error: There was a conflict trying to modify attributes with <edit-config> in plugin cordova-plugin-paramedic. The conflicting plugin, undefined, already modified the same attributes. The conflict must be resolved before cordova-plugin-paramedic can be added. You may use --force to add the plugin and overwrite the conflicting attributes.
   
   Based on my local and manual testing using my [test app](https://github.com/breautek/cordova-file-api30-test-app), I believe that this PR is still an improvement over what is currently in master.
   
   I'll merge in approximately 24 hours if there are no objections.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-file] breautek commented on pull request #487: feat: Request external permission when listing external directories

Posted by GitBox <gi...@apache.org>.
breautek commented on pull request #487:
URL: https://github.com/apache/cordova-plugin-file/pull/487#issuecomment-1070905572


   > Is this still going to merge sometime @breautek ? smile_cat
   
   I suppose it's been well over 24 hours without objections. :smile: 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-file] peitschie commented on pull request #487: feat: Request external permission when listing external directories

Posted by GitBox <gi...@apache.org>.
peitschie commented on pull request #487:
URL: https://github.com/apache/cordova-plugin-file/pull/487#issuecomment-1070351132


   Is this still going to merge sometime @breautek ? 😸 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org