rename some vars

This commit is contained in:
Tomsic, Jason 2018-07-06 07:52:52 -04:00
commit 8adb78a629

View file

@ -1910,8 +1910,8 @@ int fix_attributes(char *path, u32 *total, u32 is_root, u32 check_first_run)
{ {
FRESULT res; FRESULT res;
DIR dir; DIR dir;
u32 i = 0; u32 dirLength = 0;
u32 k = 0; u32 fileLength = 0;
static FILINFO fno; static FILINFO fno;
if (check_first_run) if (check_first_run)
@ -1942,20 +1942,20 @@ int fix_attributes(char *path, u32 *total, u32 is_root, u32 check_first_run)
if (is_root && !strcmp(fno.fname, "Nintendo")) if (is_root && !strcmp(fno.fname, "Nintendo"))
{ {
path[i] = 0; path[dirLength] = 0;
continue; continue;
} }
// Set new directory. // Set new directory.
i = strlen(path); dirLength = strlen(path);
memcpy(&path[i], "/", 1); memcpy(&path[dirLength], "/", 1);
for (k = 0; k < 256; k++) for (fileLength = 0; fileLength < 256; fileLength++)
{ {
if (fno.fname[k] == 0) if (fno.fname[fileLength] == 0)
break; break;
} }
memcpy(&path[i+1], fno.fname, k + 1); memcpy(&path[dirLength+1], fno.fname, fileLength + 1);
path[i + k + 2] = 0; path[dirLength + fileLength + 2] = 0;
// Check if archive bit is set. // Check if archive bit is set.
if (fno.fattrib & AM_ARC) if (fno.fattrib & AM_ARC)
@ -1973,7 +1973,7 @@ int fix_attributes(char *path, u32 *total, u32 is_root, u32 check_first_run)
break; break;
} }
// Clear file or folder path. // Clear file or folder path.
path[i] = 0; path[dirLength] = 0;
} }
f_closedir(&dir); f_closedir(&dir);
} }