Permalink
Browse files

tlib#cache#Filename(): Use tlib#hash#CRC32B(file) instead of not Adle…

…r32 for filenames too long
  • Loading branch information...
1 parent 1ee72ed commit f91efd430b2cabcdb7679727fb1064e6ad88fec0 @tomtom committed Dec 19, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 autoload/tlib/cache.vim
View
9 autoload/tlib/cache.vim
@@ -4,7 +4,7 @@
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 2007-06-30.
" @Last Change: 2012-12-03.
-" @Revision: 0.1.215
+" @Revision: 0.1.216
" |tlib#cache#Purge()|: Remove cache files older than N days.
@@ -94,9 +94,10 @@ function! tlib#cache#Filename(type, ...) "{{{3
let cache_file = tlib#file#Join([dir, file])
if len(cache_file) > g:tlib#cache#max_filename
let shortfilename = pathshorten(file)
- if exists('*or')
- let shortfilename .= '_'. tlib#hash#Adler32(file)
- endif
+ let shortfilename .= '_'. tlib#hash#CRC32B(file)
+ " if exists('*or')
+ " let shortfilename .= '_'. tlib#hash#Adler32(file)
+ " endif
let cache_file = tlib#cache#Filename(a:type, shortfilename, mkdir, dir0)
endif
" TLogVAR cache_file

0 comments on commit f91efd4

Please sign in to comment.