Reranko05 commented on PR #824:
URL: https://github.com/apache/commons-io/pull/824#issuecomment-3765514927

   ## Description
   Fixes IO-771 by ensuring that
   `FilenameUtils.getFullPathNoEndSeparator` does not return a trailing
   path separator when `includeEndSeparator` is false.
   
   This change aligns the implementation with the existing unit test
   `FilenameUtilsTest.testGetFullPathNoEndSeparator_IO_771`, which exposes
   the inconsistent behavior for mixed Windows/POSIX paths.
   
   ## Motivation
   The current implementation may return a trailing separator in certain
   cases, leading to inconsistent results across platforms. This fix
   removes the trailing separator only when appropriate, without altering
   prefix or path semantics.
   
   ## Testing
   - Ran `mvn` locally on Windows.
   - Symlink-related tests fail on Windows due to OS privilege restrictions
     (symbolic link creation requires elevated privileges or Developer Mode).
   - The IO-771 test passes locally.
   - The full test suite is expected to pass on CI (Linux/macOS).
   


-- 
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