gnodet commented on code in PR #97:
URL: https://github.com/apache/maven-filtering/pull/97#discussion_r1504230487


##########
src/main/java/org/apache/maven/shared/filtering/FilteringUtils.java:
##########
@@ -371,6 +375,23 @@ private static void copyFilePermissions(File source, File 
destination) throws IO
         }
     }
 
+    @SuppressWarnings("ResultOfMethodCallIgnored")
+    private static void setAllPermissions(File file) throws IOException {
+        if (file.exists()) {
+            try {
+                Files.setPosixFilePermissions(
+                        file.toPath(),
+                        EnumSet.of(
+                                PosixFilePermission.OWNER_READ, 
PosixFilePermission.OWNER_WRITE,
+                                PosixFilePermission.GROUP_READ, 
PosixFilePermission.GROUP_WRITE,
+                                PosixFilePermission.OTHERS_READ, 
PosixFilePermission.OTHERS_WRITE));

Review Comment:
   It's not.  The permissions from the source file are copied, see 
https://github.com/apache/maven-filtering/blob/ac09a5bc42e7fe812b93106537372441a8cbd6b4/src/main/java/org/apache/maven/shared/filtering/FilteringUtils.java#L333
   That's why I did not bother initially with the exec flag.



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