mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-19 04:06:43 -04:00
Fixed recursive recipe includes. Closes #387.
This commit is contained in:
parent
5e268af84b
commit
739d0ab892
@ -68,7 +68,7 @@ object Recipes {
|
||||
if (!userRecipes.exists()) {
|
||||
FileUtils.copyURLToFile(getClass.getResource("/assets/opencomputers/recipes/user.recipes"), userRecipes)
|
||||
}
|
||||
val config = ConfigParseOptions.defaults.
|
||||
lazy val config: ConfigParseOptions = ConfigParseOptions.defaults.
|
||||
setSyntax(ConfigSyntax.CONF).
|
||||
setIncluder(new ConfigIncluder with ConfigIncluderFile {
|
||||
var fallback: ConfigIncluder = _
|
||||
@ -82,7 +82,7 @@ object Recipes {
|
||||
|
||||
override def includeFile(context: ConfigIncludeContext, what: File) = {
|
||||
val in = if (what.isAbsolute) new FileReader(what) else new FileReader(new File(userRecipes.getParentFile, what.getPath))
|
||||
val result = ConfigFactory.parseReader(in)
|
||||
val result = ConfigFactory.parseReader(in, config)
|
||||
in.close()
|
||||
result.root()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user