filename | src/lxpaths.c |
changeset | 1283:2cbafe321d6f |
prev | 1205:a486ac64f34b |
next | 1286:8376a612a79d |
author | nkeynes |
date | Tue Mar 27 17:39:05 2012 +1000 (12 years ago) |
permissions | -rw-r--r-- |
last change | Treat quotes as entering a double-quoted string (mostly redundant, but we generate them in the path escaping for some reason) |
file | annotate | diff | log | raw |
1.1 --- a/src/lxpaths.c Mon Jan 30 20:11:08 2012 +10001.2 +++ b/src/lxpaths.c Tue Mar 27 17:39:05 2012 +10001.3 @@ -79,6 +79,7 @@1.4 d = result;1.5 e = result+sizeof(result)-1;1.6 s = input;1.7 + gboolean inDQstring = FALSE;1.9 if( input == NULL )1.10 return NULL;1.11 @@ -137,11 +138,20 @@1.12 } else {1.13 *d++ = '\\';1.14 }1.15 + } else if( c == '\"' ) {1.16 + /* Unescaped double-quotes start a DQ string. Although we treat the1.17 + * string as if it were double-quoted for most purposes anyway, so1.18 + * this has little effect.1.19 + */1.20 + inDQstring = !inDQstring;1.21 } else {1.22 *d++ = c;1.23 }1.24 }1.25 *d = '\0';1.26 + if( inDQstring ) {1.27 + WARN( "Unterminated double-quoted string '%s'", input );1.28 + }1.29 return g_strdup(result);1.30 }1.31 gchar *get_absolute_path( const gchar *in_path )
.