aMule Forum
English => en_Bugs => Topic started by: deloun on August 24, 2007, 03:50:20 PM
-
There's a little bug in the search results window. When a filename extension is .iso the filetype gets displayed correct as CD-Image but when it is in uppercase letters, .ISO, the file type 'any' gets displayed.
-
Shouldn't happen as the file extension will be always be made lower case. Could you please provide more information?
-
Shouldn't happen as the file extension will be always be made lower case.
Well, there are some filenames where file extension is not made lower case but are with uppercase .ISO. Try a search for iso to test and you will see there will show up some filenames with .ISO extension in uppercases and behind that you'll see at those file the filtype 'any'.
-
No, I mean when aMule checks the file types, it will first make the extension lower case.
// Examines a filename and determines the filetype
FileType GetFiletype(const wxString& filename)
{
if( filename.Find('.' ) == -1 )
return ftAny;
wxString ext = filename.AfterLast('.').MakeLower();
(...)
if ( ext==wxT("cue") || ext==wxT("bin") || ext==wxT("iso") || ext==wxT("ccd") ||
ext==wxT("sub") || ext==wxT("nrg") || ext==wxT("img") || ext==wxT("bwa") ||
ext==wxT("bwi") || ext==wxT("bws") || ext==wxT("bwt") || ext==wxT("mds") ||
ext==wxT("mdf") )
return ftCDImage;
-
Yes I understood what you meant but it seems that that they don't all get converted to lowercases. Try a search for 'iso' to test and you'll see some filenames with .ISO as extension.
-
Maybe there is a space after the .ISO or it's a different characterset that has a char that looks similar to one of ours.
-
Taht's actually a server problem.
-
If the problem is the space, maybe this line:
wxString ext = filename.AfterLast('.').MakeLower();
should be something like
wxString ext = filename.AfterLast('.').MakeLower().trim();
?
(on java, trim is a method that removes starting and ending spaces on a String, I have no clue about wx).
Regards.
-
Taht's actually a server problem.