aMule Forum

English => en_Bugs => Topic started by: deloun on August 24, 2007, 03:50:20 PM

Title: .ISO files
Post 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.
Title: Re: .ISO files
Post by: wuischke on August 24, 2007, 04:46:21 PM
Shouldn't happen as the file extension will be always be made lower case. Could you please provide more information?
Title: Re: .ISO files
Post by: deloun on August 24, 2007, 04:55:34 PM
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'.
Title: Re: .ISO files
Post by: wuischke on August 24, 2007, 04:58:56 PM
No, I mean when aMule checks the file types, it will first make the extension lower case.

Quote
// 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;
Title: Re: .ISO files
Post by: deloun on August 24, 2007, 05:09:51 PM
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.
Title: Re: .ISO files
Post by: Vollstrecker on August 24, 2007, 05:18:31 PM
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.
Title: Re: .ISO files
Post by: Kry on August 24, 2007, 05:37:15 PM
Taht's actually a server problem.
Title: Re: .ISO files
Post by: skolnick on August 25, 2007, 04:53:08 AM
If the problem is the space, maybe this line:
Code: [Select]
wxString ext = filename.AfterLast('.').MakeLower();should be something like
Code: [Select]
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.
Title: Re: .ISO files
Post by: Kry on August 25, 2007, 05:19:03 AM
Taht's actually a server problem.