arturobernalg opened a new pull request, #282:
URL: https://github.com/apache/maven-artifact-plugin/pull/282

   AbstractBuildinfoMojo.relative(File), used to build every "saved to", 
diffoscope and wget hint message, computed a relative path by stripping 
basedir's path length from the front of file's path. That breaks whenever file 
isn't actually under basedir: a sibling directory sharing basedir's name as a 
prefix (basedir=/a/b, file=/a/bc/d) silently produced the wrong relative path 
(d instead of ../bc/d), and a file shorter than basedir threw 
StringIndexOutOfBoundsException.
   
   Route both call sites through Path.relativize, which handles both cases 
correctly. Extracted the computation into a package-private static overload so 
it can be unit-tested without a MavenSession.
   
   ---
   
   To make clear that you license your contribution under the Apache License 
Version 2.0, January 2004, check one of the following:
   
   - [x] I hereby declare this contribution to be licensed under the Apache 
License Version 2.0, January 2004
   - [x] I hereby declare that I have filed an Apache Individual Contributor 
License Agreement
   https://claude.ai/code/session_0153qyh22xBMN1vPfWGz3jSH


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to