Sync with L2jServer HighFive Apr 1st 2015.
This commit is contained in:
@ -48,15 +48,18 @@ public class FaenorScriptEngine extends ScriptEngine
|
||||
{
|
||||
final File packDirectory = new File(Config.DATAPACK_ROOT, PACKAGE_DIRECTORY);
|
||||
final File[] files = packDirectory.listFiles(new XMLFilter());
|
||||
for (File file : files)
|
||||
if (files != null)
|
||||
{
|
||||
try (InputStream in = new FileInputStream(file))
|
||||
for (File file : files)
|
||||
{
|
||||
parseScript(new ScriptDocument(file.getName(), in), null);
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
_log.log(Level.WARNING, e.getMessage(), e);
|
||||
try (InputStream in = new FileInputStream(file))
|
||||
{
|
||||
parseScript(new ScriptDocument(file.getName(), in), null);
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
_log.log(Level.WARNING, e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user