Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 90c2b028 authored by Yan Wang's avatar Yan Wang
Browse files

startop: Fix the if condition to prevent duplicate filename for file id

0 in host compiler.

Test: pytest
Bug: 140655545
Change-Id: I952db4cf06060483cfcf8e42352324ad0d710d3b
parent 68655ec6
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -139,7 +139,9 @@ def build_protobuf(page_runs, inode2filename, filters=[]):
      continue

    file_id = file_id_map.get(filename)
    if not file_id:
    # file_id could 0, which satisfies "if file_id" and causes duplicate
    # filename for file id 0.
    if file_id is None:
      file_id = file_id_counter
      file_id_map[filename] = file_id_counter
      file_id_counter = file_id_counter + 1