- /*
- * Sometimes we get ".../foo* /" as FILE (without the space).
- * While the shell and `ls' don't mind, we certainly do,
- * because it makes us think there is no wildcard, only a
- * directory name.
- */
- if (!NILP(Fstring_match(build_string("[[?*]"), file, Qnil, Qnil)))
- {
- wildcard = Qt;
- filename = XSTRING_DATA(file);
- len = strlen(filename);
- if (len > 0 && (filename[len - 1] == '\\' ||
- filename[len - 1] == '/'))
- {
- filename[len - 1] = '\0';
- }
- file = build_string(filename);
- }