[retro-gtk] core-descriptor: Check existence of module file in get_module_file()
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [retro-gtk] core-descriptor: Check existence of module file in get_module_file()
- Date: Fri, 17 Mar 2017 14:04:57 +0000 (UTC)
commit c5dc74c996856603afbbdd0cea9ac1d049465be9
Author: theawless <theawless gmail com>
Date: Tue Mar 14 20:18:42 2017 +0530
core-descriptor: Check existence of module file in get_module_file()
File.get_child(string name) returns a File even if no file with such
name exists. Hence, check if this File points to anything else return
null.
https://bugzilla.gnome.org/show_bug.cgi?id=779924
retro-gtk/retro-core-descriptor.vala | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/retro-gtk/retro-core-descriptor.vala b/retro-gtk/retro-core-descriptor.vala
index 744004a..1bfbd2a 100644
--- a/retro-gtk/retro-core-descriptor.vala
+++ b/retro-gtk/retro-core-descriptor.vala
@@ -88,8 +88,11 @@ public class Retro.CoreDescriptor : Object {
return null;
var module = get_module ();
+ var module_file = dir.get_child (module);
+ if (!module_file.query_exists ())
+ return null;
- return dir.get_child (module);
+ return module_file;
}
public bool has_platform (string platform) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]