You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/09/22 05:06:05 UTC

[GitHub] [netbeans] mbien commented on a diff in pull request #4654: Made FileUtil to copy POSIX permissions

mbien commented on code in PR #4654:
URL: https://github.com/apache/netbeans/pull/4654#discussion_r977201017


##########
platform/openide.filesystems/src/org/openide/filesystems/FileUtil.java:
##########
@@ -567,6 +569,7 @@ static FileObject copyFileImpl(FileObject source, FileObject destFolder, String
             }
 
             copy(bufIn, bufOut);
+            copyPosixPerms(source, dest);
             copyAttributes(source, dest);

Review Comment:
   just a thought:
   Files.copy(...) would copy posix permissions too (there is also a COPY_ATTRIBUTES option). Alternative impl would check if its an actual file first, if it is, it would use Files.copy() with paths, otherwise use streams.
   
   Maybe its worth thinking about refreshing this code if it isn't too much work? Otherwise we end up reimplementing everything what Files.copy already does.



-- 
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: notifications-unsubscribe@netbeans.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists