Re: [sandbox] Get gvir_sandbox_util_guess_image_format search for the last '.'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 01, 2015 at 02:46:14PM +0200, Cédric Bosdonnat wrote:
> gvir_sandbox_util_guess_image_format is failing to find the extension
> in paths like /tmp/tmp.mg0tQ1JLFl/mine.img
> ---
>  libvirt-sandbox/libvirt-sandbox-util.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libvirt-sandbox/libvirt-sandbox-util.c b/libvirt-sandbox/libvirt-sandbox-util.c
> index 6385291..d73fc8b 100644
> --- a/libvirt-sandbox/libvirt-sandbox-util.c
> +++ b/libvirt-sandbox/libvirt-sandbox-util.c
> @@ -40,7 +40,7 @@ gint gvir_sandbox_util_guess_image_format(const gchar *path,
>  {
>      gchar *tmp;
>  
> -    if ((tmp = strchr(path, '.')) == NULL) {
> +    if ((tmp = g_strrstr(path, ".")) == NULL) {
>          g_set_error(error, GVIR_SANDBOX_UTIL_ERROR, 0,
>                      _("Cannot identify file extension in '%s'"), path);
>          return -1;

ACK

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]