tool: rockchip: boot/trust_merger: ignore prepath when it's already exist

Change-Id: I33b1b14ba7b68ab08e1e61bf98e476da3b13b56a
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This commit is contained in:
Joseph Chen 2019-05-27 11:14:33 +08:00
parent 05b87a4eed
commit 2e6f3f4c09
2 changed files with 2 additions and 2 deletions

View File

@ -149,7 +149,7 @@ static inline void fixPath(char *path)
strcpy(path, gNewPath);
strcat(path, tmp);
}
} else if (gPrePath) {
} else if (gPrePath && strncmp(path, gPrePath, strlen(gPrePath))) {
strcpy(tmp, path);
strcpy(path, gPrePath);
strcat(path, tmp);

View File

@ -110,7 +110,7 @@ static inline void fixPath(char *path)
strcpy(path, gNewPath);
strcat(path, tmp);
}
} else if (gPrePath) {
} else if (gPrePath && strncmp(path, gPrePath, strlen(gPrePath))) {
strcpy(tmp, path);
strcpy(path, gPrePath);
strcat(path, tmp);