Correct file line handling
This commit is contained in:
parent
bf1cba0f8b
commit
fdff4d6893
1 changed files with 7 additions and 4 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue