gvfs-gphoto2 fails when copying files from the camera using caja or nautilus
This commit is contained in:
parent
1fd186364d
commit
d48f19b462
54
glib-g-file-copy-rhbz984913.patch
Normal file
54
glib-g-file-copy-rhbz984913.patch
Normal file
@ -0,0 +1,54 @@
|
||||
From be2656f13952dd22d348ff5e3f43240700cdef5a Mon Sep 17 00:00:00 2001
|
||||
From: Colin Walters <walters@verbum.org>
|
||||
Date: Wed, 16 Oct 2013 14:10:22 +0000
|
||||
Subject: g_file_copy: Fall back to pathname queryinfo to help gvfs backends
|
||||
|
||||
It's not difficult to do; not all backends implement it, and for some
|
||||
it may be difficult to implement query_info_on_read(), so let's just
|
||||
do both.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=706254
|
||||
---
|
||||
diff --git a/gio/gfile.c b/gio/gfile.c
|
||||
index afaee21..bf936ec 100644
|
||||
--- a/gio/gfile.c
|
||||
+++ b/gio/gfile.c
|
||||
@@ -3112,6 +3112,8 @@ file_copy_fallback (GFile *source,
|
||||
|
||||
if (attrs_to_read != NULL)
|
||||
{
|
||||
+ GError *tmp_error = NULL;
|
||||
+
|
||||
/* Ok, ditch the previous lightweight info (on Unix we just
|
||||
* called lstat()); at this point we gather all the information
|
||||
* we need about the source from the opened file descriptor.
|
||||
@@ -3119,7 +3121,26 @@ file_copy_fallback (GFile *source,
|
||||
g_object_unref (info);
|
||||
|
||||
info = g_file_input_stream_query_info (file_in, attrs_to_read,
|
||||
- cancellable, error);
|
||||
+ cancellable, &tmp_error);
|
||||
+ if (!info)
|
||||
+ {
|
||||
+ /* Not all gvfs backends implement query_info_on_read(), we
|
||||
+ * can just fall back to the pathname again.
|
||||
+ * https://bugzilla.gnome.org/706254
|
||||
+ */
|
||||
+ if (g_error_matches (tmp_error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED))
|
||||
+ {
|
||||
+ g_clear_error (&tmp_error);
|
||||
+ info = g_file_query_info (source, attrs_to_read, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
|
||||
+ cancellable, error);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ g_free (attrs_to_read);
|
||||
+ g_propagate_error (error, tmp_error);
|
||||
+ goto out;
|
||||
+ }
|
||||
+ }
|
||||
g_free (attrs_to_read);
|
||||
if (!info)
|
||||
goto out;
|
||||
--
|
||||
cgit v0.9.2
|
10
glib2.spec
10
glib2.spec
@ -1,7 +1,7 @@
|
||||
Summary: A library of handy utility functions
|
||||
Name: glib2
|
||||
Version: 2.36.3
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
License: LGPLv2+
|
||||
Group: System Environment/Libraries
|
||||
URL: http://www.gtk.org
|
||||
@ -9,6 +9,9 @@ URL: http://www.gtk.org
|
||||
Source: http://download.gnome.org/sources/glib/2.36/glib-%{version}.tar.xz
|
||||
Patch0: 0001-Revert-g_file_set_contents-don-t-fsync-on-ext3-4.patch
|
||||
Patch1: 0001-gnetworkmonitornetlink-handle-default-route-via-devi.patch
|
||||
# Fix for https://bugzilla.redhat.com/show_bug.cgi?id=984913
|
||||
# gvfs-gphoto2 fails when copying files from the camera using caja or nautilus
|
||||
Patch2: glib-g-file-copy-rhbz984913.patch
|
||||
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: gettext
|
||||
@ -68,6 +71,7 @@ The glib2-fam package contains the FAM (File Alteration Monitor) module for GIO.
|
||||
%setup -q -n glib-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
autoreconf -i -f
|
||||
|
||||
@ -190,6 +194,10 @@ gio-querymodules-%{__isa_bits} %{_libdir}/gio/modules
|
||||
%{_libdir}/gio/modules/libgiofam.so
|
||||
|
||||
%changelog
|
||||
* Sun Nov 17 2013 Richard W.M. Jones <rjones@redhat.com> - 2.36.3-4
|
||||
- Fix for https://bugzilla.redhat.com/show_bug.cgi?id=984913
|
||||
gvfs-gphoto2 fails when copying files from the camera using caja or nautilus
|
||||
|
||||
* Thu Aug 1 2013 David Woodhouse <David.Woodhouse@intel.com> - 2.36.3-3
|
||||
- Backport patch from upstream for online detection failure (#983426)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user