mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 05:01:09 +00:00
Added a better test for './' and changed a few other things about the
correct_dir_fullname() function. Ian
This commit is contained in:
parent
75b20f2eaf
commit
24cfae7295
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user