You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2020/07/18 20:27:03 UTC

[maven-surefire] branch fastqueue updated: [SUREFIRE-1825] Unable to zip the Cucumber TXT report file on Linux and MacOS

This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch fastqueue
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git


The following commit(s) were added to refs/heads/fastqueue by this push:
     new c101372  [SUREFIRE-1825] Unable to zip the Cucumber TXT report file on Linux and MacOS
c101372 is described below

commit c1013725cbf8e546ad69606c89ce149de46043ea
Author: tibordigana <ti...@apache.org>
AuthorDate: Sat Jul 18 22:26:55 2020 +0200

    [SUREFIRE-1825] Unable to zip the Cucumber TXT report file on Linux and MacOS
---
 .../org/apache/maven/plugin/surefire/report/FileReporterUtils.java  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterUtils.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterUtils.java
index 31d1904..5c0e5b1 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterUtils.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterUtils.java
@@ -47,6 +47,10 @@ public final class FileReporterUtils
 
     private static String getOSSpecificIllegalChars()
     {
-        return IS_OS_WINDOWS ? "\\/:*?\"<>|\0" : "/\0";
+        // forbidden and quoted characters
+        // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
+        // https://cygwin.com/cygwin-ug-net/using-specialnames.html
+        // https://www.cyberciti.biz/faq/linuxunix-rules-for-naming-file-and-directory-names/
+        return IS_OS_WINDOWS ? "[],\\/:*?\"<>|\0" : "()&\\/:*?\"<>|\0";
     }
 }