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/02/09 18:13:26 UTC

[GitHub] [commons-io] ashcheglov opened a new pull request #203: IO-719: Fixed error of copying directories between different filesystems

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


   Also fixed relativize error for different types of paths
   (absolute/relative)


----------------------------------------------------------------
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 #203: IO-719: Fixed error of copying directories between different file systems

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


   @ashcheglov 
   Thank  you for your PR, I applied the patch in two separate commits with additional clean ups and minor refactoring. Please see git master and close this PR if your use case is satified.
   
   


----------------------------------------------------------------
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] coveralls edited a comment on pull request #203: IO-719: Fixed error of copying directories between different filesystems

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


   
   [![Coverage Status](https://coveralls.io/builds/37000665/badge)](https://coveralls.io/builds/37000665)
   
   Coverage remained the same at 89.25% when pulling **54e8c974fea913f1411f2e9c1d6d08406bb3b9f7 on ashcheglov:master** into **40b9af504c8c9cb313869786516348775443c086 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 #203: IO-719: Fixed error of copying directories between different filesystems

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


   @ashcheglov 
   The jar file you refer to in the new tests does not exist, you should put in in the same place as the other test fixtures: `/src/test/resources/org/apache/commons/io`.
   


----------------------------------------------------------------
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] coveralls commented on pull request #203: IO-719: Fixed error of copying directories between different filesystems

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


   
   [![Coverage Status](https://coveralls.io/builds/36998967/badge)](https://coveralls.io/builds/36998967)
   
   Coverage remained the same at 89.25% when pulling **b47e52a4f19634132e18a85f34543948a4f3b9d8 on ashcheglov:master** into **40b9af504c8c9cb313869786516348775443c086 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 a change in pull request #203: IO-719: Fixed error of copying directories between different filesystems

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



##########
File path: src/main/java/org/apache/commons/io/file/CopyDirectoryVisitor.java
##########
@@ -153,7 +155,7 @@ public FileVisitResult preVisitDirectory(final Path directory, final BasicFileAt
 
     @Override
     public FileVisitResult visitFile(final Path sourceFile, final BasicFileAttributes attributes) throws IOException {
-        final Path targetFile = targetDirectory.resolve(sourceDirectory.relativize(sourceFile));
+        final Path targetFile = targetDirectory.resolve(sourceDirectory.relativize(sourceFile).toString());

Review comment:
       As above...




----------------------------------------------------------------
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 removed a comment on pull request #203: IO-719: Fixed error of copying directories between different filesystems

Posted by GitBox <gi...@apache.org>.
garydgregory removed a comment on pull request #203:
URL: https://github.com/apache/commons-io/pull/203#issuecomment-776726858


   @ashcheglov 
   The jar file you refer to in the new tests does not exist, you should put in in the same place as the other test fixtures: `/src/test/resources/org/apache/commons/io`.
   


----------------------------------------------------------------
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 #203: IO-719: Fixed error of copying directories between different filesystems

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



##########
File path: src/main/java/org/apache/commons/io/file/CopyDirectoryVisitor.java
##########
@@ -144,7 +144,7 @@ public int hashCode() {
     @Override
     public FileVisitResult preVisitDirectory(final Path directory, final BasicFileAttributes attributes)
         throws IOException {
-        final Path newTargetDir = targetDirectory.resolve(sourceDirectory.relativize(directory));
+        final Path newTargetDir = targetDirectory.resolve(sourceDirectory.relativize(directory).toString());

Review comment:
       Hi @ashcheglov 
   I think we need a comment as to why toString() is _required_.




----------------------------------------------------------------
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] ashcheglov closed pull request #203: IO-719: Fixed error of copying directories between different file systems

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


   


----------------------------------------------------------------
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] ashcheglov commented on pull request #203: IO-719: Fixed error of copying directories between different file systems

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


   Cool, thanks!


----------------------------------------------------------------
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] ashcheglov commented on pull request #203: IO-719: Fixed error of copying directories between different filesystems

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


   Looks like all checks passed, excluding early access environments


----------------------------------------------------------------
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] coveralls edited a comment on pull request #203: IO-719: Fixed error of copying directories between different filesystems

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


   
   [![Coverage Status](https://coveralls.io/builds/37004127/badge)](https://coveralls.io/builds/37004127)
   
   Coverage remained the same at 89.25% when pulling **bd0d6f4b50ea72ada2ba2e732bcfbc579d6c3366 on ashcheglov:master** into **40b9af504c8c9cb313869786516348775443c086 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