Skip to content

Commit 4468d1f

Browse files
committed
List file nit
1 parent 60a60df commit 4468d1f

File tree

1 file changed

+2
-2
lines changed
  • templates/lfs/nucleo-h563zi

1 file changed

+2
-2
lines changed

templates/lfs/nucleo-h563zi/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ static void list_files(const char *path) {
4141
struct dirent *dp;
4242
while ((dp = readdir(dirp)) != NULL) {
4343
if (strcmp(dp->d_name, ".") == 0 || strcmp(dp->d_name, "..") == 0) continue;
44-
printf(" %s%s%s\n", path, dp->d_name, (dp->d_type & DT_DIR) ? "/" : "");
44+
printf(" %s/%s%s\n", path, dp->d_name, (dp->d_type & DT_DIR) ? "/" : "");
4545
if (dp->d_type & DT_DIR) {
4646
char dir[strlen(path) + strlen(dp->d_name) + 2];
47-
snprintf(dir, sizeof(dir), "%s%s/", path, dp->d_name);
47+
snprintf(dir, sizeof(dir), "%s/%s", path, dp->d_name);
4848
list_files(dir);
4949
}
5050
}

0 commit comments

Comments
 (0)