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

Commit 270ebefc authored by JP Abgrall's avatar JP Abgrall Committed by Android Git Automerger
Browse files

am b2c34ece: Merge "adb: Don\'t clobber block devices during push"

* commit 'b2c34ece':
  adb: Don't clobber block devices during push
parents c1790a0b b2c34ece
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -339,10 +339,13 @@ static int do_send(int s, char *path, char *buffer)
    if(!tmp || errno) {
        mode = 0644;
        is_link = 0;
    }

    } else {
        struct stat st;
        /* Don't delete files before copying if they are not "regular" */
        if(lstat(path, &st) || S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) {
            adb_unlink(path);

        }
    }

#ifdef HAVE_SYMLINKS
    if(is_link)