From 9bd390f8e613f5e9cf9166d51e9ad4f573c82293 Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Fri, 1 Apr 2022 23:35:20 -0700 Subject: [PATCH] dotc.io.Path uses java.io.File for string path --- compiler/src/dotty/tools/io/Path.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/src/dotty/tools/io/Path.scala b/compiler/src/dotty/tools/io/Path.scala index 7ed0bc515b82..dddb870afc65 100644 --- a/compiler/src/dotty/tools/io/Path.scala +++ b/compiler/src/dotty/tools/io/Path.scala @@ -52,7 +52,7 @@ object Path { def roots: List[Path] = FileSystems.getDefault.getRootDirectories.iterator().asScala.map(Path.apply).toList - def apply(path: String): Path = apply(Paths.get(path)) + def apply(path: String): Path = apply(new java.io.File(path).toPath) def apply(jpath: JPath): Path = try { if (Files.isRegularFile(jpath)) new File(jpath) else if (Files.isDirectory(jpath)) new Directory(jpath)