lib/rpm_database.rb in machinery-tool-1.16.0 vs lib/rpm_database.rb in machinery-tool-1.16.1

- old
+ new

@@ -120,24 +120,29 @@ [path, changes, type] end def parse_stat_line(line) - mode, user, group, uid, gid, type, *path = line.split(":") + mode, user, group, uid, gid, type, *path_line = line.split(":") + path = path_line.join(":").chomp user = uid if user == "UNKNOWN" group = gid if group == "UNKNOWN" type = case type when "directory" "dir" when "symbolic link" "link" - when "regular file" + when /file$/ "file" + else + raise( + "The inspection failed because of the unknown type `#{type}` of file `#{path}`." + ) end - [path.join(":").chomp, + [path, { mode: mode, user: user, group: group, type: type