diff --git a/Plugins/MIDI/MIDI/MIDIContainer.mm b/Plugins/MIDI/MIDI/MIDIContainer.mm index 8fb13f473..da64072db 100755 --- a/Plugins/MIDI/MIDI/MIDIContainer.mm +++ b/Plugins/MIDI/MIDI/MIDIContainer.mm @@ -50,7 +50,7 @@ midi_container midi_file; - if ( !midi_processor::process_file( data, [[[url absoluteString] pathExtension] UTF8String], midi_file) ) + if ( !midi_processor::process_file( data, [[url pathExtension] UTF8String], midi_file) ) return 0; long track_count = midi_file.get_subsong_count(); diff --git a/Plugins/MIDI/MIDI/MIDIDecoder.mm b/Plugins/MIDI/MIDI/MIDIDecoder.mm index bebe191d3..f416fd49a 100755 --- a/Plugins/MIDI/MIDI/MIDIDecoder.mm +++ b/Plugins/MIDI/MIDI/MIDIDecoder.mm @@ -45,7 +45,7 @@ file_data.resize( size ); [s read:&file_data[0] amount:size]; - if ( !midi_processor::process_file(file_data, [[[[s url] absoluteString] lastPathComponent] UTF8String], midi_file) ) + if ( !midi_processor::process_file(file_data, [[[s url] pathExtension] UTF8String], midi_file) ) return NO; int track_num = [[[s url] fragment] intValue]; //What if theres no fragment? Assuming we get 0.