fix for loading cached dts from zip archives #1466

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
4 participants
@blackwc
Contributor

blackwc commented Nov 15, 2015

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.

@crabmusket crabmusket added the Bug label Nov 18, 2015

@crabmusket

This comment has been minimized.

Show comment
Hide comment
@crabmusket

crabmusket Nov 18, 2015

Contributor

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?

Contributor

crabmusket commented Nov 18, 2015

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?

@blackwc

This comment has been minimized.

Show comment
Hide comment
@blackwc

blackwc Nov 18, 2015

Contributor

Correct. It checks for the cached dts.

Contributor

blackwc commented Nov 18, 2015

Correct. It checks for the cached dts.

@blackwc

This comment has been minimized.

Show comment
Hide comment
@blackwc

blackwc Nov 20, 2015

Contributor

I'll need to add this back in, no doubt.

Contributor

blackwc commented Nov 20, 2015

I'll need to add this back in, no doubt.

@rasteron

This comment has been minimized.

Show comment
Hide comment
@rasteron

rasteron Dec 16, 2015

Contributor

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.

Contributor

rasteron commented Dec 16, 2015

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);

This comment has been minimized.

@Lopuska

Lopuska Feb 26, 2016

Member

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

Lopuska Feb 26, 2016

Member

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.

@blackwc

This comment has been minimized.

Show comment
Hide comment
@blackwc

blackwc Feb 27, 2016

Contributor

@Lopuska didn't mean to leave that out. All good now.

Contributor

blackwc commented Feb 27, 2016

@Lopuska didn't mean to leave that out. All good now.

@blackwc

This comment has been minimized.

Show comment
Hide comment
@blackwc

blackwc Feb 27, 2016

Contributor

@rasteron I haven't noticed any of those issues.

Contributor

blackwc commented Feb 27, 2016

@rasteron I haven't noticed any of those issues.

@Lopuska Lopuska added this to the 3.9 milestone Feb 27, 2016

@Lopuska Lopuska self-assigned this Feb 27, 2016

@Alex-doc Alex-doc referenced this pull request Mar 4, 2016

Merged

Fix zipped dts loading #1540

@Lopuska

This comment has been minimized.

Show comment
Hide comment
@Lopuska

Lopuska Mar 4, 2016

Member

Dear @blackwc,
Me and @Alex-doc have decided to improve this in a different and more proper way:
Check #1540 and feel free to comment and give your opinion on that.

Closing this as we have a more consistent version.
Thanks for your help and contribution.

Member

Lopuska commented Mar 4, 2016

Dear @blackwc,
Me and @Alex-doc have decided to improve this in a different and more proper way:
Check #1540 and feel free to comment and give your opinion on that.

Closing this as we have a more consistent version.
Thanks for your help and contribution.

@Lopuska Lopuska closed this Mar 4, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment