Skip to content

Commit 115c841

Browse files
committed
fix
1 parent c0aefc1 commit 115c841

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

core/common/test/files/SmokeFileTestWindows.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ class SmokeFileTestWindows {
1111
@Test
1212
fun isAbsolute() {
1313
if (!isWindows) return
14-
assertFalse(Path("C:").isAbsolute)
14+
assertTrue(Path("C:").isAbsolute)
1515
assertTrue(Path("C:\\").isAbsolute)
1616
assertTrue(Path("C:/").isAbsolute)
1717
assertTrue(Path("C:/../").isAbsolute)
18-
assertFalse(Path("C:file").isAbsolute)
18+
assertTrue(Path("C:file").isAbsolute)
1919
assertFalse(Path("bla\\bla\\bla").isAbsolute)
2020
assertTrue(Path("\\\\server\\share").isAbsolute)
2121
}

core/mingw/src/files/FileSystemMingw.kt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,6 @@ internal actual fun basenameImpl(path: String): String {
5454
}
5555

5656
internal actual fun isAbsoluteImpl(path: String): Boolean {
57-
if (path.startsWith(SystemPathSeparator)) return true
58-
if (path.length > 1 && path[1] == ':') {
59-
if (path.length == 2) return false
60-
val next = path[2]
61-
return next == WindowsPathSeparator || next == SystemPathSeparator
62-
}
6357
return PathIsRelativeW(path) == 0
6458
}
6559

0 commit comments

Comments
 (0)