Permalink
Browse files

tlib#cache#Filename(): If the cache filename is too long, add the Adl…

…er32 checksum to the shortened path
  • Loading branch information...
1 parent d65378a commit a78d23971ff3c63163e04d03225572b9c9aa4907 @tomtom committed Dec 14, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 autoload/tlib/cache.vim
View
@@ -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.213
+" @Revision: 0.1.214
" |tlib#cache#Purge()|: Remove cache files older than N days.
@@ -93,7 +93,7 @@ function! tlib#cache#Filename(type, ...) "{{{3
endif
let cache_file = tlib#file#Join([dir, file])
if len(cache_file) > g:tlib#cache#max_filename
- let cache_file = tlib#cache#Filename(a:type, pathshorten(file), mkdir, dir0)
+ let cache_file = tlib#cache#Filename(a:type, pathshorten(file) .'_'. tlib#hash#Adler32(file), mkdir, dir0)
endif
" TLogVAR cache_file
return cache_file

0 comments on commit a78d239

Please sign in to comment.