1
1

Replaced the character comparison with string comparison, which

emphasizes the intention of the code. If the directory is either "." or
"./", the plain filename is chosen.
Этот коммит содержится в:
Roland Illig 2006-02-04 00:00:47 +00:00
родитель 2d6b472fb0
Коммит 0780979cbc

Просмотреть файл

@ -758,9 +758,9 @@ find_do_view_edit (int unparsed_view, int edit, char *dir, char *file)
filename = file + 4;
line = 0;
}
if (dir [0] == '.' && dir [1] == 0)
if (strcmp(dir, ".") == 0 || strcmp(dir, "."PATH_SEP_STR) == 0)
fullname = g_strdup (filename);
else if (dir [0] == '.' && dir [1] == PATH_SEP && dir[2] != '\0')
else if (strncmp(dir, "."PATH_SEP_STR, 2) == 0)
fullname = concat_dir_and_file (dir+2, filename);
else
fullname = concat_dir_and_file (dir, filename);