Show More
@@ -8,6 +8,7 b'' | |||
|
8 | 8 | from __future__ import absolute_import |
|
9 | 9 | |
|
10 | 10 | import errno |
|
11 | import hashlib | |
|
11 | 12 | import os |
|
12 | 13 | import stat |
|
13 | 14 | |
@@ -19,8 +20,6 b' from . import (' | |||
|
19 | 20 | util, |
|
20 | 21 | ) |
|
21 | 22 | |
|
22 | _sha = util.sha1 | |
|
23 | ||
|
24 | 23 | # This avoids a collision between a file named foo and a dir named |
|
25 | 24 | # foo.i or foo.d |
|
26 | 25 | def _encodedir(path): |
@@ -211,7 +210,7 b' def _auxencode(path, dotencode):' | |||
|
211 | 210 | _maxshortdirslen = 8 * (_dirprefixlen + 1) - 4 |
|
212 | 211 | |
|
213 | 212 | def _hashencode(path, dotencode): |
|
214 |
digest = |
|
|
213 | digest = hashlib.sha1(path).hexdigest() | |
|
215 | 214 | le = lowerencode(path[5:]).split('/') # skips prefix 'data/' or 'meta/' |
|
216 | 215 | parts = _auxencode(le, dotencode) |
|
217 | 216 | basename = parts[-1] |
General Comments 0
You need to be logged in to leave comments.
Login now