(YaneSDK): check for init.dat in "arc" subdir.

This commit is contained in:
morkt 2018-02-25 07:19:14 +04:00
parent f0ca4a57ca
commit dcc4feee80

View File

@ -127,9 +127,14 @@ namespace GameRes.Formats.YaneSDK
else if ("init.dat" == dat_name)
return file.CreateStream();
// try to open 'init.dat' archive in the same directory
var init_dat = VFS.CombinePath (VFS.GetDirectoryName (file.Name), "init.dat");
var dir_name = VFS.GetDirectoryName (file.Name);
var init_dat = VFS.CombinePath (dir_name, "init.dat");
if (!VFS.FileExists (init_dat))
return file.CreateStream();
{
init_dat = VFS.CombinePath (VFS.CombinePath (dir_name, "arc"), "init.dat");
if (!VFS.FileExists (init_dat))
return file.CreateStream();
}
try
{
using (var init = VFS.OpenView (init_dat))