You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2021/03/26 13:03:32 UTC

[GitHub] [commons-io] trungPa opened a new pull request #217: IO-727: fix directoryContains() handling files with the same prefix

trungPa opened a new pull request #217:
URL: https://github.com/apache/commons-io/pull/217


   - Fix `FilenameUtils.directoryContains`. Add a file separator to the end of the parent directory to avoid treating files having the same prefix as subdirectories. `directoryContains` will return false when either parent or child is empty.
   - Explicitly state in the docs that the input paths are expected to be canonical.
   - Add a new test case for FilenameUtils.directoryContains.
   - Replace `testIO466` with a new test case to demonstrate the bug (the current `testIO466` will always pass because fooFile doesn't exist)
   
   Jira: https://issues.apache.org/jira/browse/IO-727


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

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



[GitHub] [commons-io] garydgregory commented on a change in pull request #217: IO-727: fix directoryContains() handling files with the same prefix

Posted by GitBox <gi...@apache.org>.
garydgregory commented on a change in pull request #217:
URL: https://github.com/apache/commons-io/pull/217#discussion_r702015507



##########
File path: src/test/java/org/apache/commons/io/FileUtilsDirectoryContainsTestCase.java
##########
@@ -134,9 +134,16 @@ public void testSameFile() throws IOException {
     }
 
     @Test
-    public void testIO466() throws IOException {

Review comment:
       Please don't remove an existing test, it makes reviewing harder.




-- 
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@commons.apache.org

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



[GitHub] [commons-io] garydgregory closed pull request #217: IO-727: FilenameUtils directoryContains() should handle files with the same prefix

Posted by GitBox <gi...@apache.org>.
garydgregory closed pull request #217:
URL: https://github.com/apache/commons-io/pull/217


   


-- 
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@commons.apache.org

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



[GitHub] [commons-io] coveralls edited a comment on pull request #217: IO-727: fix directoryContains() handling files with the same prefix

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #217:
URL: https://github.com/apache/commons-io/pull/217#issuecomment-808299921


   
   [![Coverage Status](https://coveralls.io/builds/38288923/badge)](https://coveralls.io/builds/38288923)
   
   Coverage increased (+0.05%) to 89.309% when pulling **8d4bb5233fa38f672327744e7c9cb946a235ac1b on trungPa:IO-727-directoryContains** into **c1ee77787f74ce9b660bf377462059d084458fef on apache:master**.
   


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

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



[GitHub] [commons-io] trungPa commented on a change in pull request #217: IO-727: FilenameUtils directoryContains() should handle files with the same prefix

Posted by GitBox <gi...@apache.org>.
trungPa commented on a change in pull request #217:
URL: https://github.com/apache/commons-io/pull/217#discussion_r702121836



##########
File path: src/test/java/org/apache/commons/io/FileUtilsDirectoryContainsTestCase.java
##########
@@ -134,9 +134,16 @@ public void testSameFile() throws IOException {
     }
 
     @Test
-    public void testIO466() throws IOException {

Review comment:
       The fix has been applied in d42b9286eb7a534f1b2b6243858ff7ef6fcac14c so isn't it time to close this pr?
   anyway, I've rebased and restored the test.




-- 
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@commons.apache.org

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



[GitHub] [commons-io] coveralls commented on pull request #217: IO-727: fix directoryContains() handling files with the same prefix

Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #217:
URL: https://github.com/apache/commons-io/pull/217#issuecomment-808299921


   
   [![Coverage Status](https://coveralls.io/builds/38286137/badge)](https://coveralls.io/builds/38286137)
   
   Coverage increased (+0.02%) to 89.28% when pulling **089603ee38740b71842759a19977148848dd18cc on trungPa:IO-727-directoryContains** into **c1ee77787f74ce9b660bf377462059d084458fef on apache:master**.
   


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

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



[GitHub] [commons-io] garydgregory commented on pull request #217: IO-727: fix directoryContains() handling files with the same prefix

Posted by GitBox <gi...@apache.org>.
garydgregory commented on pull request #217:
URL: https://github.com/apache/commons-io/pull/217#issuecomment-871578088


   @trungPa
   May you please rebase on master? I see failures on Java 17 but the logs have expired.
   


-- 
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@commons.apache.org

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