[libdmapsharing] Don't error out when media filename includes %20, etc Signed-off-by: W. Michael Petullo <mike flyn o



commit e433bafb15bcf0c162a6d552f61dc03dee8a50ea
Author: W. Michael Petullo <mike flyn org>
Date:   Thu Nov 25 23:30:29 2010 -0600

    Don't error out when media filename includes %20, etc
    Signed-off-by: W. Michael Petullo <mike flyn org>

 libdmapsharing/dpap-share.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libdmapsharing/dpap-share.c b/libdmapsharing/dpap-share.c
index 8ca8bac..d588cfa 100644
--- a/libdmapsharing/dpap-share.c
+++ b/libdmapsharing/dpap-share.c
@@ -457,7 +457,9 @@ add_entry_to_mlcl (gpointer id,
 
 			mapped_file = file_to_mmap (location);
 			if (mapped_file == NULL) {
-				g_error ("Error opening %s", location);
+				g_warning ("Error opening %s", location);
+				data = NULL;
+				size = 0;
 			} else {
 				data = (unsigned char *) g_mapped_file_get_contents (mapped_file);
 				size = g_mapped_file_get_length (mapped_file);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]