--- a/src/lxpaths.c Mon Jan 30 20:11:08 2012 +1000 +++ b/src/lxpaths.c Tue Mar 27 17:39:05 2012 +1000 @@ -79,6 +79,7 @@ d = result; e = result+sizeof(result)-1; s = input; + gboolean inDQstring = FALSE; if( input == NULL ) return NULL; @@ -137,11 +138,20 @@ } else { *d++ = '\\'; } + } else if( c == '\"' ) { + /* Unescaped double-quotes start a DQ string. Although we treat the + * string as if it were double-quoted for most purposes anyway, so + * this has little effect. + */ + inDQstring = !inDQstring; } else { *d++ = c; } } *d = '\0'; + if( inDQstring ) { + WARN( "Unterminated double-quoted string '%s'", input ); + } return g_strdup(result); } gchar *get_absolute_path( const gchar *in_path )