Home » U++ Library support » U++ Core » FindFile problem in XP [BUG?]
FindFile problem in XP [BUG?] [message #19422] |
Tue, 02 December 2008 22:38  |
 |
koldo
Messages: 3435 Registered: August 2008
|
Senior Veteran |
|
|
Hello all
Here it is a possible problem when using FindFile in XP.
A small sample code:
CONSOLE_APP_MAIN
{
FindFile ff;
if(ff.Search("c:\\*.for")) {
do {
puts(Format("Found file: %s", ff.GetName()));
} while(ff.Next());
}
puts("Programa ended");
getchar();
}
If file list in c:\ is:
- RightFile.for
- WrongFile.fordoc
- WrongFile2.fordoc
Result is:
Found file: RightFile.for
Programa ended
But if file list in c:\ is:
- WrongFile.fordoc
- WrongFile2.fordoc
- zRightFile.for
The result is:
Found file: WrongFile.fordoc
Found file: zRightFile.for
Programa ended
It seems that the implementation of FindFile::Search() is ok but
handle = UnicodeWin32().FindFirstFileW(ToSystemCharsetW(name), w); does not work right, perhaps because it does not handle properly files with long extensions.
Best regards
Koldo
Best regards
IƱaki
|
|
|
Goto Forum:
Current Time: Mon May 12 13:42:38 CEST 2025
Total time taken to generate the page: 0.00603 seconds
|