ladislav-zezula / CascLib

An open-source implementation of library for reading CASC storages from Blizzard games since 2014
MIT License
423 stars 121 forks source link

Windows: Initialization fails because CascLib is looking for .agent.db #26

Closed robpaveza closed 8 years ago

robpaveza commented 8 years ago

On my Windows machine, games are located as such:

Games are fully patched.

Even the comments of InitializeCascDirectories says "The root directory is the one where .build.info is", but CheckGameDirectory() looks for .agent.db. If I modify InitializeCascDirectories to check the parent of the current directory for .build.info instead, it works.

ladislav-zezula commented 8 years ago

The problem is more complcated than that. The Agent.db is searched because CascLib searches for the data subdirectory there. My plan was that caller of CascOpenStorage could use any directory within the game

To see where the CASC data are actually located, the library searches for ".agent.db" to find "data_dir" there. That is then used as a subdirectory where the data files are searched.

Checked all my game installations, and the ".agent.db" is always present, with the date quite recent - Even Starcraft II, which I recently updated to contain CASC storage, has the file there. If you are saying that the file is not always present, then I have a problem.

robpaveza commented 8 years ago

I do not find .agent.db within my game directories at all.

On Nov 13, 2015, at 7:41 AM, Ladislav Zezula notifications@github.com wrote:

The problem is more complcated than that. The Agent.db is searched because CascLib searches for the data subdirectory there. My plan was that caller of CascOpenStorage could use any directory within the game

The game directory itself Any subdirectory To see where the CASC data are actually located, the library searches for ".agent.db" to find "data_dir" there. That is then used as a subdirectory where the data files are searched. — Reply to this email directly or view it on GitHub.

ladislav-zezula commented 8 years ago

Fixed in commit 223e15f91ae8bb1d1bf2e947fcf797cab2f0a2e4