change method to find '/' as the suggestion of @sheinz
This commit is contained in:
parent
028bc01414
commit
8be2c20a4f
1 changed files with 3 additions and 7 deletions
|
|
@ -199,13 +199,9 @@ static bool process_directory(const char *direcotry)
|
|||
}
|
||||
sprintf(path, "%s/%s", direcotry, ep->d_name);
|
||||
filename = path;
|
||||
file_ptr = path;
|
||||
while(*file_ptr != 0 && *file_ptr != '/') {
|
||||
file_ptr ++;
|
||||
}
|
||||
if(*file_ptr != 0) {
|
||||
filename = file_ptr + 1;
|
||||
}
|
||||
filename = strchr(path, '/');
|
||||
filename = filename ? &filename[1] : path;
|
||||
|
||||
printf("Processing file source %s, dest: %s\n", path, filename);
|
||||
if (!process_file(path, filename)) {
|
||||
printf("Error processing file\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue