Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

FIX: Prevent cache corruption by moving before tags write. #37

Merged
merged 1 commit into from Apr 21, 2013

Conversation

Projects
None yet
2 participants
Contributor

inkarkat commented Nov 26, 2012

A side effect of xolox#easytags#write_tagsfile() is that the entries argument is joined together. This then causes problems in s:cache_tagged_files_in(), where the filename element is addressed via entry[1]. When the entries have been flattened, this accesses a single character, and then the cache is corrupted.

To fix this, move the cache update before the writing of the tags file. This avoids the need to make a copy of the entries before flattening them.

FIX: Prevent cache corruption by moving before tags write.
A side effect of xolox#easytags#write_tagsfile() is that the entries argument is joined together. This then causes problems in s:cache_tagged_files_in(), where the filename element is addressed via entry[1]. When the entries have been flattened, this accesses a single character, and then the cache is corrupted.

To fix this, move the cache update before the writing of the tags file. This avoids the need to make a copy of the entries before flattening them.

xolox added a commit that referenced this pull request Apr 21, 2013

@xolox xolox merged commit 10afe7f into xolox:master Apr 21, 2013

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