Closed
Description
The following code sequence in compile/test/dotty/tools/dotc/reporting/TestReporter.scala, lines 89 through 92 attempts to create a file with multiple embedded colons, throwing an exception in Windows:
val df1 = new SimpleDateFormat("yyyy-MM-dd-HH:mm:ss")
val folder = s"../testlogs/tests-${df0.format(date)}"
new JFile(folder).mkdirs()
outFile = new JFile(s"$folder/tests-${df1.format(date)}.log")
outFile.createNewFile // added to trigger java.io.IOException locally, not in TestReporter.scala
Here's the exception:
java.io.FileNotFoundException: ..\testlogs\tests-2017-10-23\tests-2017-10-23-10:18:51.log (The filename, directory name, or volume label syntax is incorrect)
replacing colons with hyphens (or other legal path characters) in the SimpleDateFormat seems to fix the problem.
Metadata
Metadata
Assignees
Labels
No labels