summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authortimeless <timeless@gmail.com>2013-11-01 12:01:34 +0200
committerRoss Lagerwall <rosslagerwall@gmail.com>2013-11-01 12:02:58 +0200
commit0f5d4be5ceb7fa4df7882b784f8c8e41303b8d8c (patch)
tree773246eef8ec04b1ba25d15dc650ce8130957ef7 /common
parentb30678e3f49f04a207870e8a58084fa96cce5a99 (diff)
downloadgvfs-0f5d4be5ceb7fa4df7882b784f8c8e41303b8d8c.tar.gz
common: Make autorun.inf parsing less strict
Make the parsing of autorun.inf less strict by ignoring whitespace around "=". Tweaked by Ross Lagerwall to prevent a match occurring if the part after the "=" contains only whitespace. https://bugzilla.gnome.org/show_bug.cgi?id=595027
Diffstat (limited to 'common')
-rw-r--r--common/gvfsmountinfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/gvfsmountinfo.c b/common/gvfsmountinfo.c
index 60a3527f..054af574 100644
--- a/common/gvfsmountinfo.c
+++ b/common/gvfsmountinfo.c
@@ -107,7 +107,7 @@ on_autorun_loaded (GObject *source_object,
/* [^,] is because sometimes the icon= line
* has a comma at the end
**/
- icon_regex = g_regex_new ("icon=([^,\\r\\n]+)",
+ icon_regex = g_regex_new ("icon\\s*=\\s*+([^,\\r\\n]+)",
G_REGEX_CASELESS, 0, NULL);
g_regex_match (icon_regex, content, 0,
&match_info);