Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » FindFile problem in XP [BUG?]
FindFile problem in XP [BUG?] [message #19422] Tue, 02 December 2008 22:38 Go to previous message
koldo is currently offline  koldo
Messages: 3361
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
 
Read Message
Read Message
Read Message
Previous Topic: [BUG] resolving program's file name for debug output
Next Topic: String [FEATURE REQUEST]
Goto Forum:
  


Current Time: Wed May 15 11:59:32 CEST 2024

Total time taken to generate the page: 0.02440 seconds