[Bug 8226] New: DlgDirListComboBox does not fail properly on bad path spec argument
http://bugs.winehq.org/show_bug.cgi?id=8226 Summary: DlgDirListComboBox does not fail properly on bad path spec argument Product: Wine Version: 0.9.35. Platform: Other OS/Version: other Status: UNCONFIRMED Severity: normal Priority: P2 Component: wine-user AssignedTo: wine-bugs(a)winehq.org ReportedBy: lupien(a)physique.usherbrooke.ca When a path spec is given that is not a directory and that does not contain any * or ? then DlgDirListComboBox should fail and return False. Currently it can return true. See http://msdn2.microsoft.com/en-us/library/ms673323.aspx The problem for me occured in a win31 program extended to 32bit by watcom. The program relies on a failure in the routine to open file from a fancy file manager. The non failing prevented any file to be loaded. The call is with the DDL_DIRECTORY|DDL_EXCLUSIVE flags. An exemple: Let a directory "c:\test" contain many files including one subdirectory ("c:\test\testsub") then a call to DlgDirListComboBox with path spec of "c:\\test", or "c:\\test\\" or "c:\\test\\*.*" should all return true and produce the same listing. But a call with "c:\\test\\test.c" should fail (wether or not test.c exist because the file spec does not contain any * or ?. I checked this behavior under windows XP. Under the current wine I tested (0.9.35 from fedora core 5 extras) this does not fail. The actual problem is in the DIALOG_DlgDirListW function of dlls/user32/dialog.c. I will attach a patch that produces the correct behavior (compared to XP) and fixes my problem. A related problem is that under windows (at least XP) when calling with only the DDL_DRIVES attribute produce the same result as calling with DDL_DRIVES | DDL_EXCLUSIVE but this is not the case under wine. My program is filling a box with files and drives but it is supposed to contain only drives. The same happends when sending a message to the listbox directly so I attach a patch that fixes the problem in the LISTBOX_Directory function of ddls/user32/listbox.c. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
participants (1)
-
Wine Bugs