From: Derk-Jan Hartman Date: Sat, 18 Jan 2003 04:57:08 +0000 (+0000) Subject: * ./modules/gui/macosx/open.m X-Git-Tag: 0.5.0~263 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=b3016a961f6cc16de031aa2ee99ce9cab32ed5f9;p=vlc * ./modules/gui/macosx/open.m - .bin files are now opened as disks, instead of as files --- diff --git a/modules/gui/macosx/open.m b/modules/gui/macosx/open.m index 00b7b00987..670651767a 100644 --- a/modules/gui/macosx/open.m +++ b/modules/gui/macosx/open.m @@ -2,7 +2,7 @@ * open.m: MacOS X plugin for vlc ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: open.m,v 1.9 2003/01/18 04:10:58 hartman Exp $ + * $Id: open.m,v 1.10 2003/01/18 04:57:08 hartman Exp $ * * Authors: Jon Lech Johansen * Christophe Massiot @@ -348,11 +348,22 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class ) { NSString *o_mrl_string; NSString *o_filename = [o_file_path stringValue]; + NSString *o_ext = [o_filename pathExtension]; vlc_bool_t b_stream = [o_file_stream state]; - o_mrl_string = [NSString stringWithFormat: @"%s://%@", - b_stream ? "stream" : "file", - o_filename]; + if ([o_ext isEqualToString: @"bin"] || + [o_ext isEqualToString: @"cue"] || + [o_ext isEqualToString: @"vob"] || + [o_ext isEqualToString: @"iso"]) + { + o_mrl_string = o_filename; + } + else + { + o_mrl_string = [NSString stringWithFormat: @"%s://%@", + b_stream ? "stream" : "file", + o_filename]; + } [o_mrl setStringValue: o_mrl_string]; }