mirror of
https://github.com/CTCaer/hekate.git
synced 2025-04-20 11:35:56 +00:00
move an operation to the beginning of the loop so we don't have to have it twice
This commit is contained in:
parent
31b92d65ce
commit
03fdd19b3a
1 changed files with 3 additions and 6 deletions
|
@ -1938,6 +1938,9 @@ int fix_attributes(char *path, u32 *total, u32 is_root, u32 check_first_run)
|
|||
dirLength = strlen(path);
|
||||
for (;;)
|
||||
{
|
||||
// Clear file or folder path.
|
||||
path[dirLength] = 0;
|
||||
|
||||
// Read a directory item.
|
||||
res = f_readdir(&dir, &fno);
|
||||
|
||||
|
@ -1947,10 +1950,7 @@ int fix_attributes(char *path, u32 *total, u32 is_root, u32 check_first_run)
|
|||
|
||||
// Skip official Nintendo dir.
|
||||
if (is_root && !strcmp(fno.fname, "Nintendo"))
|
||||
{
|
||||
path[dirLength] = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Set new directory or file.
|
||||
memcpy(&path[dirLength], "/", 1);
|
||||
|
@ -1972,9 +1972,6 @@ int fix_attributes(char *path, u32 *total, u32 is_root, u32 check_first_run)
|
|||
if (res != FR_OK)
|
||||
break;
|
||||
}
|
||||
|
||||
// Clear file or folder path.
|
||||
path[dirLength] = 0;
|
||||
}
|
||||
|
||||
f_closedir(&dir);
|
||||
|
|
Loading…
Add table
Reference in a new issue