Skip to content

Commit 4e9f610

Browse files
Merge pull request scala#14826 from som-snytt/tweak/test-breakage
io.Path uses java.io.File for string path
2 parents 4a96ce7 + 9bd390f commit 4e9f610

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/io/Path.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ object Path {
5252

5353
def roots: List[Path] = FileSystems.getDefault.getRootDirectories.iterator().asScala.map(Path.apply).toList
5454

55-
def apply(path: String): Path = apply(Paths.get(path))
55+
def apply(path: String): Path = apply(new java.io.File(path).toPath)
5656
def apply(jpath: JPath): Path = try {
5757
if (Files.isRegularFile(jpath)) new File(jpath)
5858
else if (Files.isDirectory(jpath)) new Directory(jpath)

0 commit comments

Comments
 (0)