Resolve relative file paths relative to current script rather than home folder (for included sub-scripts)

This commit is contained in:
Reinhard Pointner 2019-06-22 14:25:40 +07:00
parent cf932c7c61
commit cbd5af4ef6
1 changed files with 2 additions and 2 deletions

View File

@ -115,11 +115,11 @@ public class ExpressionFormatFunctions {
}
public static List<String> readLines(Script context, Object path) throws Exception {
return FileUtilities.readLines(getUserFile(context, path));
return FileUtilities.readLines(resolve(context, path));
}
public static Object readXml(Script context, Object path) throws Exception {
return new XmlSlurper().parse(getUserFile(context, path));
return new XmlSlurper().parse(resolve(context, path));
}
public static File getUserFile(Script context, Object path) throws Exception {