summaryrefslogtreecommitdiff
path: root/src/trg-file-parser.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-10-03 09:36:52 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-10-03 09:36:52 +0000
commit5ce226277955a7d1aa6f5d0e00acb2ee98041003 (patch)
treeabe471016e38d7ea8d9559eee35afe0ef6687261 /src/trg-file-parser.c
parenta9780439e066ea76d7b5aa6af66a8a539c59b0cf (diff)
use an icon for file wanted/unwanted
Diffstat (limited to 'src/trg-file-parser.c')
-rw-r--r--src/trg-file-parser.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/trg-file-parser.c b/src/trg-file-parser.c
index 0a4a8c0..582ee82 100644
--- a/src/trg-file-parser.c
+++ b/src/trg-file-parser.c
@@ -113,10 +113,15 @@ trg_torrent_file *trg_parse_torrent_file(const gchar *filename)
be_node *top_node, *info_node, *name_node;
trg_torrent_file *ret = NULL;
+ if (g_file_test(filename, G_FILE_TEST_IS_REGULAR)) {
+ g_error("%s does not exist", filename);
+ return NULL;
+ }
+
mf = g_mapped_file_new(filename, FALSE, &error);
if (error) {
- g_message("%s",error->message);
+ g_error("%s",error->message);
g_error_free(error);
g_mapped_file_unref(mf);
return NULL;