mirror of
https://github.com/wiiu-env/libfat.git
synced 2024-11-25 19:36:52 +01:00
Fixed problem when openning files starting with "fat"
This commit is contained in:
parent
fdf340791d
commit
0d1dbf4df5
@ -28,6 +28,9 @@
|
|||||||
|
|
||||||
2006-07-11 - Chishm
|
2006-07-11 - Chishm
|
||||||
* Original release
|
* Original release
|
||||||
|
|
||||||
|
2006-08-10 - Chishm
|
||||||
|
* Fixed problem when openning files starting with "fat"
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -424,7 +427,10 @@ PARTITION* _FAT_partition_getPartitionFromPath (const char* path) {
|
|||||||
|
|
||||||
// Device name extraction code taken from DevKitPro
|
// Device name extraction code taken from DevKitPro
|
||||||
namelen = strlen(DEVICE_NAME);
|
namelen = strlen(DEVICE_NAME);
|
||||||
if( strncmp(DEVICE_NAME, path, namelen) == 0 ) {
|
if (strchr (path, ':') == NULL) {
|
||||||
|
// No device specified
|
||||||
|
partitionNumber = PI_DEFAULT;
|
||||||
|
} else if( strncmp(DEVICE_NAME, path, namelen) == 0 ) {
|
||||||
if ( path[namelen] == ':' ) {
|
if ( path[namelen] == ':' ) {
|
||||||
// Only the device name is specified
|
// Only the device name is specified
|
||||||
partitionNumber = PI_DEFAULT;
|
partitionNumber = PI_DEFAULT;
|
||||||
@ -435,9 +441,6 @@ PARTITION* _FAT_partition_getPartitionFromPath (const char* path) {
|
|||||||
// Incorrect device name
|
// Incorrect device name
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
} else if (strchr (path, ':') == NULL) {
|
|
||||||
// No device specified
|
|
||||||
partitionNumber = PI_DEFAULT;
|
|
||||||
} else {
|
} else {
|
||||||
// Incorrect device name
|
// Incorrect device name
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user