Commit 24cfae72 authored by Ian Main's avatar Ian Main

Added a better test for './' and changed a few other things about the

correct_dir_fullname() function.

Ian
parent 75b20f2e
......@@ -1560,9 +1560,18 @@ correct_dir_fullname(CompletionDir* cmpl_dir)
struct stat sbuf;
if (strcmp(cmpl_dir->fullname + length - 2, "/.") == 0)
cmpl_dir->fullname[length - 2] = 0;
{
if (length == 2)
{
strcpy(cmpl_dir->fullname, "/");
cmpl_dir->fullname_len = 1;
return TRUE;
} else {
cmpl_dir->fullname[length - 2] = 0;
}
}
else if (strcmp(cmpl_dir->fullname + length - 3, "/./") == 0)
cmpl_dir->fullname[length - 3] = 0;
cmpl_dir->fullname[length - 2] = 0;
else if (strcmp(cmpl_dir->fullname + length - 3, "/..") == 0)
{
if(length == 3)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment