mirror of
https://github.com/sharkcz/rkdeveloptool.git
synced 2025-01-28 06:27:30 +01:00
main: pack command support relative path
Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
This commit is contained in:
parent
bfb8da1907
commit
641cfa16d6
6
main.cpp
6
main.cpp
@ -1048,7 +1048,7 @@ static inline void getName(char* path, uint16_t* dst) {
|
||||
else
|
||||
start++;
|
||||
end = strrchr(path, '.');
|
||||
if (!end)
|
||||
if (!end || (end < start))
|
||||
end = path + strlen(path);
|
||||
len = end - start;
|
||||
if (len >= MAX_NAME_LEN)
|
||||
@ -1144,13 +1144,11 @@ end:
|
||||
|
||||
static bool saveEntry(FILE* outFile, char* path, rk_entry_type type,
|
||||
uint16_t delay, uint32_t* offset, char* fixName, bool fix) {
|
||||
printf("write:%s\n", path);
|
||||
uint32_t size;
|
||||
rk_boot_entry entry;
|
||||
memset(&entry, 0, sizeof(rk_boot_entry));
|
||||
|
||||
printf("write:%s\n", path);
|
||||
|
||||
memset(&entry, 0, sizeof(rk_boot_entry));
|
||||
getName(fixName ? fixName: path, entry.name);
|
||||
entry.size = sizeof(rk_boot_entry);
|
||||
entry.type = type;
|
||||
|
Loading…
x
Reference in New Issue
Block a user