oops, put "%%" squash back in vips_system()
still need this afetr all
This commit is contained in:
parent
c81a12ee00
commit
42931c86ca
|
@ -122,6 +122,7 @@ vips_system_build( VipsObject *object )
|
||||||
char line[VIPS_PATH_MAX];
|
char line[VIPS_PATH_MAX];
|
||||||
char txt[VIPS_PATH_MAX];
|
char txt[VIPS_PATH_MAX];
|
||||||
VipsBuf buf = VIPS_BUF_STATIC( txt );
|
VipsBuf buf = VIPS_BUF_STATIC( txt );
|
||||||
|
char *p;
|
||||||
char *std_output;
|
char *std_output;
|
||||||
char *std_error;
|
char *std_error;
|
||||||
int result;
|
int result;
|
||||||
|
@ -170,6 +171,15 @@ vips_system_build( VipsObject *object )
|
||||||
cmd, VIPS_PATH_MAX, system->out_name ) )
|
cmd, VIPS_PATH_MAX, system->out_name ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
|
||||||
|
/* Swap all "%%" in the string for a single "%". We need this for
|
||||||
|
* compatibility with older printf-based vips_system()s which
|
||||||
|
* needed a double %%.
|
||||||
|
*/
|
||||||
|
for( p = cmd; *p; p++ )
|
||||||
|
if( p[0] == '%' &&
|
||||||
|
p[1] == '%' )
|
||||||
|
memmove( p, p + 1, strlen( p ) );
|
||||||
|
|
||||||
if( !g_spawn_command_line_sync( cmd,
|
if( !g_spawn_command_line_sync( cmd,
|
||||||
&std_output, &std_error, &result, &error ) ) {
|
&std_output, &std_error, &result, &error ) ) {
|
||||||
if( error ) {
|
if( error ) {
|
||||||
|
|
Loading…
Reference in New Issue