New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix for loading cached dts from zip archives #1466
Conversation
This seems like a good idea! This is looking for existing cached DTS files in zips, correct? Cache files don't get created inside zips if there aren't any when the zip is created? |
Correct. It checks for the cached dts. |
I'll need to add this back in, no doubt. |
Hey guys, got interested also in seeing this to work as it completes the process of packaging dts files in zip format. However, after patching a recent build with the files, I did notice that it does not cover the proper reading of the equivalent materials.cs file or particularly the equivalent compiled materials.cs.dso. Thanks. |
FileTime cachedModifyTime; | ||
if (Platform::getFileTimes(cachedPath.getFullPath(), NULL, &cachedModifyTime)) | ||
{ | ||
bool forceLoadDAE = Con::getBoolVariable("$collada::forceLoadDAE", false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello! Your PR is good! Thanks for contribution.
You may want to restore this flag as it's used in the engine and as well from the editor to force the load of *.dae instead of cached *.dts.
Like:
if( Con::getBoolVariable("$collada::forceLoadDAE", false) )
return false;
Then we can merge.
Thanks.
@Lopuska didn't mean to leave that out. All good now. |
@rasteron I haven't noticed any of those issues. |
This fixes a bug where if you attempted to load cached dts files from a zip archive it would fail. This was because it was attempting to extract the file time information from non-existent files outside of the archive. Thus, canLoadCachedDTS would return false.
I added a line to disable the file change notification errors for directories that don't exist or are in zip archive.
Additionally, I added *.pak to the search pattern for archives.