(iOS) Use fill_pathname_join throughout iOS/browser.m/iOS/platform.m

This commit is contained in:
Twinaphex 2014-07-20 21:30:31 +02:00
parent 05355a49ee
commit 9a06c1c125
2 changed files with 6 additions and 6 deletions

View File

@ -48,8 +48,8 @@ static bool zlib_extract_callback(const char *name,
// Ignore directories
if (name[strlen(name) - 1] == '/')
return true;
snprintf(path, PATH_MAX, "%s/%s", (const char*)userdata, name);
fill_pathname_join(path, (const char*)userdata, name, sizeof(path));
switch (cmode)
{
@ -96,7 +96,7 @@ static void file_action(enum file_action action, NSString* source, NSString* tar
result = [manager moveItemAtPath:source toPath:target error:&error];
break;
case FA_UNZIP:
unzip_file([source UTF8String], [target UTF8String]);
unzip_file(source.UTF8String, target.UTF8String);
break;
}

View File

@ -191,11 +191,11 @@ static void handle_touch_event(NSArray* touches)
// Build system paths and test permissions
self.documentsDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
snprintf(g_defaults.system_dir, sizeof(g_defaults.system_dir), "%s/%s", self.documentsDirectory.UTF8String, ".RetroArch");
fill_pathname_join(g_defaults.system_dir, self.documentsDirectory.UTF8String, ".RetroArch", sizeof(g_defaults.system_dir));
strlcpy(g_defaults.menu_config_dir, g_defaults.system_dir, sizeof(g_defaults.menu_config_dir));
snprintf(g_defaults.config_path, sizeof(g_defaults.config_path), "%s/retroarch.cfg", g_defaults.menu_config_dir);
snprintf(g_defaults.core_dir, sizeof(g_defaults.core_dir), "%s/%s", NSBundle.mainBundle.bundlePath.UTF8String, "modules");
fill_pathname_join(g_defaults.config_path, g_defaults.menu_config_dir, "retroarch.cfg", sizeof(g_defaults.config_path));
fill_pathname_join(g_defaults.core_dir, NSBundle.mainBundle.bundlePath.UTF8String, "modules", sizeof(g_defaults.core_dir));
strlcpy(g_defaults.sram_dir, g_defaults.system_dir, sizeof(g_defaults.sram_dir));
strlcpy(g_defaults.savestate_dir, g_defaults.system_dir, sizeof(g_defaults.savestate_dir));