1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-25 07:57:12 -07:00

Fix fixSlashes().

Fixes https://github.com/cbeust/kobalt/pull/438
This commit is contained in:
Cedric Beust 2017-05-03 11:32:41 -07:00
parent 8ea67e70cd
commit d095840121

View file

@ -134,7 +134,7 @@ class KFiles {
fun joinFileAndMakeDir(vararg ts: String) = joinDir(joinAndMakeDir(ts.slice(0..ts.size - 2)), ts[ts.size - 1])
fun fixSlashes(f: File) = f.normalize().path.replace('\\', '/')
fun fixSlashes(s: String) = fixSlashes(File(s))
fun fixSlashes(s: String) = s.replace('\\', '/')
fun makeDir(dir: String, s: String? = null) =
(if (s != null) File(dir, s) else File(dir)).apply { mkdirs() }