Correct file line handling

This commit is contained in:
Dan Hawkins 2018-11-16 23:29:39 +00:00
commit fdff4d6893

View file

@ -10,10 +10,13 @@ def currentContents(file, newline = "\n", defaultContents = "") {
}
def prefixline(rootpath, filepath) {
fileContents = readFile("${filepath}").trim()
newFileContents = ""
fileContents.eachline {
newFileContents += "${rootpath}" + "/" + it
def fileContents = readFile("${filepath}").trim()
def fileContentsNormalized = fileContents.normalize()
def newFileContents = ""
def lines = fileContentsNormalized.readLines()
for (aline in lines) {
newFileContents += "${rootpath}" + "/" + aline
}
return newFileContents
}