AmazeFileManager icon indicating copy to clipboard operation
AmazeFileManager copied to clipboard

Fix the fromContentUri null/short path causes substring crash

Open siddhesh-06 opened this issue 1 month ago • 0 comments

Description

  1. Implemented null-safety for uri.getPath()
  2. Added validation of the expected provider prefix before performing any substring operations to avoid unsafe assumptions about URI structure.
  3. Added fallback behaviour for unexpected or short paths & improved logging
  4. Prevented crashes when the constructed file does not exist

Issue tracker

Fixes #4477

Automatic tests

  • [ ] Added test cases

Manual tests

  • [ ] Done

Build tasks success

Successfully running following tasks on local:

  • [x] ./gradlew assembledebug
  • [x] ./gradlew spotlessCheck

siddhesh-06 avatar Dec 11 '25 13:12 siddhesh-06