better vips7 filename option parsing

we failed to remove :options from filenames which had no file type extension
This commit is contained in:
John Cupitt 2015-09-21 14:44:00 +01:00
parent 956e2f5cdf
commit ec0e74e1a7
2 changed files with 11 additions and 1 deletions

View File

@ -97,4 +97,3 @@ vips_format_magick_init( VipsFormatMagick *object )
}
G_DEFINE_TYPE( VipsFormatMagick, vips_format_magick, VIPS_TYPE_FORMAT );

View File

@ -79,6 +79,17 @@ im_filename_split( const char *path, char *name, char *mode )
if( *q == '.' )
break;
/* All the way back to the start? We probably have a
* filename with no extension, eg. "I180:"
*/
if( q == name )
break;
/* .. or we could hit a dirsep.
*/
if( *q == G_DIR_SEPARATOR )
break;
}
if( *p == ':' ) {