mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 00:17:11 -07:00
Put the javac command in a file.
Also introduce fixSlashes().
This commit is contained in:
parent
771f90332c
commit
4e4c5a7d9e
5 changed files with 15 additions and 8 deletions
|
@ -65,7 +65,7 @@ class JarUtils {
|
|||
entry = stream.nextEntry
|
||||
}
|
||||
} else {
|
||||
val entryFileName = file.to(foundFile.path).path.replace("\\", "/")
|
||||
val entryFileName = KFiles.fixSlashes(file.to(foundFile.path))
|
||||
val entry = JarEntry(entryFileName)
|
||||
entry.time = localFile.lastModified()
|
||||
addEntry(FileInputStream(localFile), entry, outputStream, onError)
|
||||
|
|
|
@ -115,6 +115,9 @@ class KFiles {
|
|||
*/
|
||||
fun joinFileAndMakeDir(vararg ts: String) = joinDir(joinAndMakeDir(ts.slice(0..ts.size - 2)), ts[ts.size - 1])
|
||||
|
||||
fun fixSlashes(f: File) = KFiles.fixSlashes(f.path)
|
||||
fun fixSlashes(s: String) = s.replace('\\', '/')
|
||||
|
||||
fun makeDir(dir: String, s: String? = null) =
|
||||
(if (s != null) File(dir, s) else File(dir)).apply { mkdirs() }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue