Skip to content

Commit db34c34

Browse files
authored
Fix checking if file exists (#67)
1 parent 8c5df6a commit db34c34

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/hudson/plugins/robot/RobotPublisher.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,10 +270,10 @@ public void perform(Run<?, ?> build, @Nonnull FilePath workspace, @Nonnull EnvVa
270270

271271
// Check if log and report files exist
272272
FilePath outputDir = new FilePath(workspace, expandedOutputPath);
273-
if (!new FilePath(outputDir, expandedLogFileName).exists()) {
273+
if (outputDir.list(expandedLogFileName).length == 0) {
274274
logger.println(Messages.robot_publisher_file_not_found() + " " + expandedLogFileName);
275275
}
276-
if (!new FilePath(outputDir, expandedReportFileName).exists()) {
276+
if (outputDir.list(expandedReportFileName).length == 0) {
277277
logger.println(Messages.robot_publisher_file_not_found() + " " + expandedReportFileName);
278278
}
279279

0 commit comments

Comments
 (0)