Fixes from Lixing Yuan: dosnames cleanup, fix for truename with

wildcards and trailing dots.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@598 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Bart Oldeman 2003-06-15 18:57:02 +00:00
parent f83c09df15
commit bdc63c1ff0
2 changed files with 3 additions and 3 deletions

View File

@ -116,8 +116,6 @@ int ParseDosName(const char *filename, char *fcbname, BOOL bAllowWildcards)
{
if (*filename != '\0')
return DE_FILENOTFND;
if (nDirCnt == 1) /* for d:\ */
return DE_NFILES;
memset(fcbname, '?', FNAME_SIZE + FEXT_SIZE);
return nDirCnt;
}

View File

@ -518,8 +518,10 @@ COUNT truename(const char FAR * src, char * dest, COUNT mode)
if (i & PNE_WILDCARD)
gotAnyWildcards = TRUE;
/* strip trailing dot */
if ((i & PNE_DOT) && *src != '/' && *src != '\\' && *src != '\0')
if ((i & PNE_DOT) && *src != '/' && *src != '\\')
{
if (*src == '\0')
continue;
/* we arrive here only when an extension-dot has been found */
addChar('.');
i = parse_name_ext(FEXT_SIZE, &src, &p, dest);