@@ -62,11 +62,12 @@ def print_timezone_key_values(key_value)
62
62
end
63
63
end
64
64
65
- def gather_pf_info ( name_offset , hash_offset , runcount_offset , filename , table )
65
+ def gather_pf_info ( name_offset , hash_offset , runcount_offset , filename )
66
66
# We'll load the file and parse information from the offsets
67
67
prefetch_file = read_file ( filename )
68
68
if prefetch_file . empty? or prefetch_file . nil?
69
69
print_error ( "Couldn't read file: #{ filename } " )
70
+ return nil
70
71
else
71
72
# First we'll get the filename
72
73
pf_filename = prefetch_file [ name_offset ..name_offset +60 ]
@@ -85,7 +86,7 @@ def gather_pf_info(name_offset, hash_offset, runcount_offset, filename, table)
85
86
last_modified = mtimes [ 'Modified' ] . utc . to_s
86
87
created = mtimes [ 'Created' ] . utc . to_s
87
88
end
88
- table << [ last_modified , created , run_count , path_hash , name ]
89
+ return [ last_modified , created , run_count , path_hash , name ]
89
90
end
90
91
end
91
92
@@ -166,7 +167,10 @@ def run
166
167
next
167
168
else
168
169
filename = File . join ( file [ 'path' ] , file [ 'name' ] )
169
- gather_pf_info ( name_offset , hash_offset , runcount_offset , filename , table )
170
+ pf_entry = gather_pf_info ( name_offset , hash_offset , runcount_offset , filename )
171
+ if not pf_entry . nil?
172
+ table << pf_entry
173
+ end
170
174
end
171
175
end
172
176
end
0 commit comments