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

Commit b80d2149 authored by Wei Liu's avatar Wei Liu Committed by android-build-merger
Browse files

Merge "Check the existence of raft dir." into nyc-mr1-dev am: bcd82a38

am: 5f88e4b3

* commit '5f88e4b3':
  Check the existence of raft dir.

Change-Id: Ic888d34e1fa5ff6002fe2cd64160fea1f0a290d6
parents e663b479 5f88e4b3
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -227,6 +227,13 @@ static void dump_raft() {
        MYLOGD("raft_log_path is empty\n");
        return;
    }

    struct stat s;
    if (stat(RAFT_DIR, &s) != 0 || !S_ISDIR(s.st_mode)) {
        MYLOGD("%s does not exist or is not a directory\n", RAFT_DIR);
        return;
    }

    if (!zip_writer) {
        // Write compressed and encoded raft logs to stdout if not zip_writer.
        run_command("RAFT LOGS", 600, "logcompressor", "-r", RAFT_DIR, NULL);