Skip to content

Commit

Permalink
Fix checking if file exists (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
asimell committed Feb 23, 2024
1 parent 8c5df6a commit db34c34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/hudson/plugins/robot/RobotPublisher.java
Expand Up @@ -270,10 +270,10 @@ public void perform(Run<?, ?> build, @Nonnull FilePath workspace, @Nonnull EnvVa

// Check if log and report files exist
FilePath outputDir = new FilePath(workspace, expandedOutputPath);
if (!new FilePath(outputDir, expandedLogFileName).exists()) {
if (outputDir.list(expandedLogFileName).length == 0) {
logger.println(Messages.robot_publisher_file_not_found() + " " + expandedLogFileName);
}
if (!new FilePath(outputDir, expandedReportFileName).exists()) {
if (outputDir.list(expandedReportFileName).length == 0) {
logger.println(Messages.robot_publisher_file_not_found() + " " + expandedReportFileName);
}

Expand Down

0 comments on commit db34c34

Please sign in to comment.