Skip to content

Commit

Permalink
fix issue #269
Browse files Browse the repository at this point in the history
  • Loading branch information
wowasa committed Nov 27, 2024
1 parent ec12665 commit 8297f10
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,8 @@ public class CMDInstanceReport implements NamedReport {
@Override
@XmlTransient
public String getName() {
if (fileReport.location != null && fileReport.location.contains(".xml")) {
String normalisedPath = fileReport.location.replace('\\', '/');
return FileNameEncoder.encode(normalisedPath);
}
else {
return fileReport.location;
}

return FileNameEncoder.encode(fileReport.location);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ public class FileNameEncoder {
* @return the string
*/
public static String encode(String sourceString){
return sourceString.replaceAll("[/.:]", "_");
return sourceString.replaceAll("[\\/.:]", "_");
}
}

0 comments on commit 8297f10

Please sign in to comment.