Module: wine Branch: master Commit: 7e2d1b4ade7c4f2d6975e959131aaef6937d6b27 URL: http://source.winehq.org/git/wine.git/?a=commit;h=7e2d1b4ade7c4f2d6975e95913...
Author: Jason Edmeades us@edmeades.me.uk Date: Thu Apr 5 22:47:58 2007 +0100
cmd.exe: Partially fix 'dir *.' (ie files with no extension).
---
programs/cmd/directory.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/programs/cmd/directory.c b/programs/cmd/directory.c index 95c64a1..ac1e59d 100644 --- a/programs/cmd/directory.c +++ b/programs/cmd/directory.c @@ -316,7 +316,6 @@ void WCMD_directory (char *cmd) { WINE_TRACE("Using location '%s'\n", fullname);
status = GetFullPathName (fullname, sizeof(path), path, NULL); - WINE_TRACE("Using path '%s'\n", path);
/* * If the path supplied does not include a wildcard, and the endpoint of the @@ -333,8 +332,13 @@ void WCMD_directory (char *cmd) { strcat (path, "\*"); } } + } else { + /* Special case wildcard search with no extension (ie parameters ending in '.') as + GetFullPathName strips off the additional '.' */ + if (fullname[strlen(fullname)-1] == '.') strcat(path, "."); }
+ WINE_TRACE("Using path '%s'\n", path); thisEntry = (DIRECTORY_STACK *) HeapAlloc(GetProcessHeap(),0,sizeof(DIRECTORY_STACK)); if (fullParms == NULL) fullParms = thisEntry; if (prevEntry != NULL) prevEntry->next = thisEntry;