From f0f4433bf36d594db877cdc2851637d876715666 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Fri, 26 May 2006 23:41:42 +0000 Subject: [PATCH] Convert URLs to file paths. If the key already exists, overwrite it. --- stepmania/src/arch/ArchHooks/ArchHooks_darwin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stepmania/src/arch/ArchHooks/ArchHooks_darwin.cpp b/stepmania/src/arch/ArchHooks/ArchHooks_darwin.cpp index cde09c9980..bb772a0cda 100644 --- a/stepmania/src/arch/ArchHooks/ArchHooks_darwin.cpp +++ b/stepmania/src/arch/ArchHooks/ArchHooks_darwin.cpp @@ -85,7 +85,7 @@ ArchHooks_darwin::ArchHooks_darwin() CFStringRef appID = CFBundleGetIdentifier( bundle ); CFStringRef version = CFStringRef( CFBundleGetValueForInfoDictionaryKey(bundle, kCFBundleVersionKey) ); CFURLRef path = CFBundleCopyBundleURL( bundle ); - CFPropertyListRef value = CFURLCopyPath( path ); + CFPropertyListRef value = CFURLCopyFileSystemPath( path, kCFURLPOSIXPathStyle ); CFPropertyListRef old = CFPreferencesCopyAppValue( key, appID ); CFMutableDictionaryRef newDict = NULL; @@ -110,7 +110,7 @@ ArchHooks_darwin::ArchHooks_darwin() { // The value is either not present or it is but it is different newDict = CFDictionaryCreateMutableCopy( kCFAllocatorDefault, 0, dict ); - CFDictionaryAddValue( newDict, version, value ); + CFDictionarySetValue( newDict, version, value ); } CFRelease( old ); }