1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-21 15:28:52 -05:00

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

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 {