aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: .ISO files  (Read 4024 times)

deloun

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 44
.ISO files
« 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.
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: .ISO files
« Reply #1 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?
Logged

deloun

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 44
Re: .ISO files
« Reply #2 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'.
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: .ISO files
« Reply #3 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;
Logged

deloun

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 44
Re: .ISO files
« Reply #4 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.
Logged

Vollstrecker

  • Administrator
  • Hero Member
  • *****
  • Karma: 67
  • Offline Offline
  • Posts: 1549
  • Unofficial Debian Packager
    • http://vollstreckernet.de
Re: .ISO files
« Reply #5 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.
Logged
Homefucking is killing prostitution

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: .ISO files
« Reply #6 on: August 24, 2007, 05:37:15 PM »

Taht's actually a server problem.
Logged

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Re: .ISO files
« Reply #7 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.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: .ISO files
« Reply #8 on: August 25, 2007, 05:19:03 AM »

Taht's actually a server problem.
Logged