summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2015-04-28 19:46:54 -0400
committerBastien Nocera <hadess@hadess.net>2015-04-29 13:21:06 +0200
commit85fc7cbf831e914456623a2f7a9efbe81919bf4d (patch)
tree64f2e04d44d406aad82d420c248ff950249e00c3 /src
parent65698590834ce3bb7a836d7e14b36a2ba87e0481 (diff)
downloadgrilo-plugins-85fc7cbf831e914456623a2f7a9efbe81919bf4d.tar.gz
local-metadata: Ignore sanitization if the whole filename is blacklisted
If the whole filename ends up blacklisted, then just take it as-is. https://bugzilla.gnome.org/show_bug.cgi?id=748604
Diffstat (limited to 'src')
-rw-r--r--src/local-metadata/grl-local-metadata.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/local-metadata/grl-local-metadata.c b/src/local-metadata/grl-local-metadata.c
index adc81f0..45856be 100644
--- a/src/local-metadata/grl-local-metadata.c
+++ b/src/local-metadata/grl-local-metadata.c
@@ -272,6 +272,13 @@ video_sanitise_string (const gchar *str)
if (*line_end != '\0') {
line_end = g_utf8_find_prev_char (line, line_end);
+
+ /* If everything in the string is blacklisted, just ignore
+ * the blackisting logic.
+ */
+ if (line_end == NULL)
+ return g_strdup (str);
+
/* After removing substring with blacklisted word, ignore non alpha-numeric
* char in the end of the sanitised string */
while (g_unichar_isalnum (*line_end) == FALSE &&