This commit is contained in:
Aurora 2016-10-12 02:45:49 +02:00
parent b499c7ee75
commit 014ac1cf72

View File

@ -101,7 +101,14 @@ bool fileWrite(const void *buffer, const char *path, u32 size)
break; break;
} }
case FR_NO_PATH: case FR_NO_PATH:
for(u32 i = 1; path[i] != 0; i++)
if(path[i] == '/')
{
char folder[i + 1];
memcpy(folder, path, i);
folder[i] = 0;
f_mkdir(folder);
}
ret = fileWrite(buffer, path, size); ret = fileWrite(buffer, path, size);
break; break;