Commit 54de66b5 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: fixed Reveal-in-Finder for eastern european umlauts and probably other...

macosx: fixed Reveal-in-Finder for eastern european umlauts and probably other characters without a ISO-Latin fallback (close #7631)
(cherry picked from commit bd544fff4fa8186436a2792aed375d08a82f635f)

Conflicts:
	modules/gui/macosx/playlist.m
parent d5f98e5d
Changes between 2.0.4 and 2.0.5: Changes between 2.0.4 and 2.0.5:
-------------------------------- --------------------------------
Mac OS X:
* Fix Reveal-in-Finder for files with non-Western file names
Changes between 2.0.3 and 2.0.4: Changes between 2.0.3 and 2.0.4:
-------------------------------- --------------------------------
......
...@@ -826,16 +826,18 @@ ...@@ -826,16 +826,18 @@
if(! p_item || !p_item->p_input ) if(! p_item || !p_item->p_input )
continue; continue;
o_mrl = [[NSMutableString alloc] initWithFormat: @"%s", decode_URI( input_item_GetURI( p_item->p_input ))]; char * psz_url = decode_URI(input_item_GetURI(p_item->p_input));
o_mrl = [[NSMutableString alloc] initWithString: [NSString stringWithUTF8String: psz_url ? psz_url : ""]];
if (psz_url != NULL)
free( psz_url );
/* perform some checks whether it is a file and if it is local at all... */ /* perform some checks whether it is a file and if it is local at all... */
if ([o_mrl length] > 0) if ([o_mrl length] > 0) {
{
NSRange prefix_range = [o_mrl rangeOfString: @"file:"]; NSRange prefix_range = [o_mrl rangeOfString: @"file:"];
if( prefix_range.location != NSNotFound ) if (prefix_range.location != NSNotFound)
[o_mrl deleteCharactersInRange: prefix_range]; [o_mrl deleteCharactersInRange: prefix_range];
if( [o_mrl characterAtIndex:0] == '/' ) if ([o_mrl characterAtIndex:0] == '/')
[[NSWorkspace sharedWorkspace] selectFile: o_mrl inFileViewerRootedAtPath: o_mrl]; [[NSWorkspace sharedWorkspace] selectFile: o_mrl inFileViewerRootedAtPath: o_mrl];
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment