memset(FatFileInfoPointer, 0, sizeof(FAT_FILE_INFO));
//
- // Check and see if the first character is '\' and remove it if so
+ // Check and see if the first character is '\' or '/' and remove it if so
//
- while (*FileName == '\\')
+ while ((*FileName == '\\') || (*FileName == '/'))
{
FileName++;
}
//
// Advance to the next part of the path
//
- for (; (*FileName != '\\') && (*FileName != '\0'); FileName++)
+ for (; (*FileName != '\\') && (*FileName != '/') && (*FileName != '\0'); FileName++)
{
}
FileName++;
for (i=0,num=0; i<(int)strlen(Path); i++)
{
- if (Path[i] == '\\')
+ if ((Path[i] == '\\') || (Path[i] == '/'))
{
num++;
}
// and put them in Buffer
for (i=0; i<(int)strlen(Path); i++)
{
- if (Path[i] == '\\')
+ if ((Path[i] == '\\') || (Path[i] == '/'))
{
break;
}
{
*BytesRead += BytesToRead;
}
- BytesToRead -= BytesToRead;
FatFileInfo->FilePointer += BytesToRead;
+ BytesToRead -= BytesToRead;
Buffer += BytesToRead;
}