Skip to content

Commit 58d3688

Browse files
committed
Add prefetch fix to generator function
1 parent 0d4ab00 commit 58d3688

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

DaveLasalle/prefetch.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,14 +294,16 @@ def generator(self, data):
294294
for pf_header in data:
295295
pf_file = '{0}-{1:X}.pf'.format(pf_header.Name, pf_header.Hash)
296296
if self._config.FULL_PATHS:
297+
full_path = ""
297298
for path in directories:
298-
full_path = "{0}\\{1}".format(path, pf_header.Name)
299+
tmp_path = "{0}\\{1}".format(path, pf_header.Name)
299300
if pf_header.Version == 17:
300-
pf_hash = HashGenerator(full_path).ssca_xp_hash_function()
301+
pf_hash = HashGenerator(tmp_path).ssca_xp_hash_function()
301302
elif pf_header.Version == 23:
302-
pf_hash = HashGenerator(full_path).ssca_vista_hash_function()
303+
pf_hash = HashGenerator(tmp_path).ssca_vista_hash_function()
303304

304305
if "{0}".format(pf_hash) == "{0}".format(pf_header.Hash):
306+
full_path = tmp_path
305307
break
306308

307309
yield (0, [str(pf_file),

0 commit comments

Comments
 (0)