mirror of
https://github.com/wiiu-env/libfat.git
synced 2024-11-22 09:59:18 +01:00
entryFromPath doesn't look for "" anymore - use "." to refer to the current directory
This commit is contained in:
parent
af89e9074f
commit
1a5766fbd3
@ -28,6 +28,9 @@
|
||||
|
||||
2006-08-14 - Chishm
|
||||
* entryFromPath correctly finds "" and "." now
|
||||
|
||||
2006-08-17 - Chishm
|
||||
* entryFromPath doesn't look for "" anymore - use "." to refer to the current directory
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
@ -431,16 +434,15 @@ bool _FAT_directory_entryFromPath (PARTITION* partition, DIR_ENTRY* entry, const
|
||||
while (pathPosition[0] == DIR_SEPARATOR) {
|
||||
pathPosition++;
|
||||
}
|
||||
// If the path is only specifying a directory in the form of "" or ".", return it
|
||||
if ((pathPosition >= pathEnd) || (strncasecmp(".", pathPosition, 2) == 0)) {
|
||||
_FAT_directory_getRootEntry (partition, entry);
|
||||
found = true;
|
||||
}
|
||||
} else {
|
||||
// Start in current working directory
|
||||
dirCluster = partition->cwdCluster;
|
||||
}
|
||||
|
||||
// If the path is only specifying a directory in the form of "" or ".", return it
|
||||
if ((pathPosition >= pathEnd) || (strncasecmp(".", pathPosition, 2) == 0)) {
|
||||
_FAT_directory_getRootEntry (partition, entry);
|
||||
found = true;
|
||||
}
|
||||
|
||||
while (!found && !notFound) {
|
||||
// Get the name of the next required subdirectory within the path
|
||||
|
Loading…
Reference in New Issue
Block a user