Review formatting GetPRevDirectoryPath()
This commit is contained in:
parent
64d44d131d
commit
7b001164ef
1 changed files with 3 additions and 2 deletions
|
@ -2125,8 +2125,9 @@ const char *GetPrevDirectoryPath(const char *dirPath)
|
||||||
{
|
{
|
||||||
if ((dirPath[i] == '\\') || (dirPath[i] == '/'))
|
if ((dirPath[i] == '\\') || (dirPath[i] == '/'))
|
||||||
{
|
{
|
||||||
if ((i == 2) && (dirPath[1] ==':') // Check for root: "C:\"
|
// Check for root: "C:\" or "/"
|
||||||
|| i == 0) i++; // Check for root: "/"
|
if (((i == 2) && (dirPath[1] ==':')) || (i == 0)) i++;
|
||||||
|
|
||||||
strncpy(prevDirPath, dirPath, i);
|
strncpy(prevDirPath, dirPath, i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue