From: Jens Georg Date: Fri, 17 Feb 2012 08:20:10 +0000 (+0200) Subject: core: Simplify code by using File.get_child X-Git-Tag: RYGEL_0_13_2~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a74a4648c8d60ee82b0d8b8cbac50ed9030774ad;p=profile%2Fivi%2Frygel.git core: Simplify code by using File.get_child https://bugzilla.gnome.org/show_bug.cgi?id=660477 --- diff --git a/src/rygel/rygel-plugin-loader.vala b/src/rygel/rygel-plugin-loader.vala index 293f566..cdff7cd 100644 --- a/src/rygel/rygel-plugin-loader.vala +++ b/src/rygel/rygel-plugin-loader.vala @@ -122,10 +122,7 @@ public class Rygel.PluginLoader : Object { } foreach (var info in infos) { - string file_name = info.get_name (); - string file_path = Path.build_filename (dir.get_path (), file_name); - - File file = File.new_for_path (file_path); + var file = dir.get_child (info.get_name ()); FileType file_type = info.get_file_type (); string content_type = info.get_content_type (); string mime = ContentType.get_mime_type (content_type); @@ -135,7 +132,7 @@ public class Rygel.PluginLoader : Object { this.load_modules_from_dir.begin (file); } else if (mime == "application/x-sharedlib") { // Seems like we found a module - this.load_module_from_file (file_path); + this.load_module_from_file (file.get_path ()); } }