* path.cc (suffix_scan::has): Change order of conditionals
to allow checking for .lnk suffixes even if in_suffixes is empty.
This commit is contained in:
parent
7cdc9feea1
commit
bf11a54f54
|
@ -1,4 +1,9 @@
|
||||||
Tue Mar 6 13:02:00 2001 Jason Tiller <jtiller@sjm.com>
|
Tue Mar 6 14:02:00 2001 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* path.cc (suffix_scan::has): Change order of conditionals
|
||||||
|
to allow checking for .lnk suffixes even if in_suffixes is empty.
|
||||||
|
|
||||||
|
Tue Mar 6 13:02:00 2001 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* autoload.c (cygwin_premain0): Add missing parameter.
|
* autoload.c (cygwin_premain0): Add missing parameter.
|
||||||
* binmode.c (cygwin_premain0): Ditto.
|
* binmode.c (cygwin_premain0): Ditto.
|
||||||
|
|
|
@ -2426,10 +2426,10 @@ suffix_scan::has (const char *in_path, const suffix_info *in_suffixes, char **ex
|
||||||
suffixes = in_suffixes;
|
suffixes = in_suffixes;
|
||||||
nullterm = 0;
|
nullterm = 0;
|
||||||
state = SCAN_BEG;
|
state = SCAN_BEG;
|
||||||
if (suffixes)
|
|
||||||
{
|
|
||||||
ext_here = *ext_where = strrchr (in_path, '.');
|
ext_here = *ext_where = strrchr (in_path, '.');
|
||||||
if (ext_here)
|
if (ext_here)
|
||||||
|
{
|
||||||
|
if (suffixes)
|
||||||
{
|
{
|
||||||
/* Check if the extension matches a known extension */
|
/* Check if the extension matches a known extension */
|
||||||
for (const suffix_info *ex = in_suffixes; ex->name != NULL; ex++)
|
for (const suffix_info *ex = in_suffixes; ex->name != NULL; ex++)
|
||||||
|
@ -2438,6 +2438,7 @@ suffix_scan::has (const char *in_path, const suffix_info *in_suffixes, char **ex
|
||||||
state = SCAN_JUSTCHECK;
|
state = SCAN_JUSTCHECK;
|
||||||
goto known_suffix;
|
goto known_suffix;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/* Didn't match. Use last resort -- .lnk. */
|
/* Didn't match. Use last resort -- .lnk. */
|
||||||
if (strcasematch (ext_here, ".lnk"))
|
if (strcasematch (ext_here, ".lnk"))
|
||||||
{
|
{
|
||||||
|
@ -2445,7 +2446,6 @@ suffix_scan::has (const char *in_path, const suffix_info *in_suffixes, char **ex
|
||||||
goto known_suffix;
|
goto known_suffix;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* Didn't find a matching suffix. */
|
/* Didn't find a matching suffix. */
|
||||||
ext_here = *ext_where = strchr (path, '\0');
|
ext_here = *ext_where = strchr (path, '\0');
|
||||||
|
|
Loading…
Reference in New Issue