to allow checking for .lnk suffixes even if in_suffixes is empty.
-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.
* binmode.c (cygwin_premain0): Ditto.
suffixes = in_suffixes;
nullterm = 0;
state = SCAN_BEG;
- if (suffixes)
+ ext_here = *ext_where = strrchr (in_path, '.');
+ if (ext_here)
{
- ext_here = *ext_where = strrchr (in_path, '.');
- if (ext_here)
+ if (suffixes)
{
/* Check if the extension matches a known extension */
for (const suffix_info *ex = in_suffixes; ex->name != NULL; ex++)
state = SCAN_JUSTCHECK;
goto known_suffix;
}
- /* Didn't match. Use last resort -- .lnk. */
- if (strcasematch (ext_here, ".lnk"))
- {
- state = SCAN_LNK;
- goto known_suffix;
- }
+ }
+ /* Didn't match. Use last resort -- .lnk. */
+ if (strcasematch (ext_here, ".lnk"))
+ {
+ state = SCAN_LNK;
+ goto known_suffix;
}
}