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

Commit 747a6f22 authored by Dan Albert's avatar Dan Albert Committed by Gerrit Code Review
Browse files

Merge "adb: win32: fix key files reading/writing"

parents 3937120f 9b960314
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -178,7 +178,7 @@ static int write_public_keyfile(RSA *private_key, const char *private_key_path)
        return 0;
    }

    outfile = fopen(path, "we");
    outfile = fopen(path, "w");
    if (!outfile) {
        D("Failed to open '%s'\n", path);
        return 0;
@@ -244,7 +244,7 @@ static int generate_key(const char *file)

    old_mask = umask(077);

    f = fopen(file, "we");
    f = fopen(file, "w");
    if (!f) {
        D("Failed to open '%s'\n", file);
        umask(old_mask);
@@ -278,7 +278,7 @@ static int read_key(const char *file, struct listnode *list)
{
    D("read_key '%s'\n", file);

    FILE* fp = fopen(file, "re");
    FILE* fp = fopen(file, "r");
    if (!fp) {
        D("Failed to open '%s': %s\n", file, strerror(errno));
        return 0;