[gvfs] mtp: Fix a runtime warning
- From: Ross Lagerwall <rossl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] mtp: Fix a runtime warning
- Date: Sat, 13 Sep 2014 21:06:22 +0000 (UTC)
commit 50a5d4c1de2997cfebc14d37e49fe54658cf1678
Author: Ross Lagerwall <rosslagerwall gmail com>
Date: Sat Sep 13 13:59:19 2014 +0100
mtp: Fix a runtime warning
Fix a runtime warning introduced by 32983ccd7e3d ("MTP: Fix error
semantics for do_pull/do_push/do_make_directory") which occurs when
pulling and the destination does not exist.
https://bugzilla.gnome.org/show_bug.cgi?id=734305
daemon/gvfsbackendmtp.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/daemon/gvfsbackendmtp.c b/daemon/gvfsbackendmtp.c
index 2c52622..e049233 100644
--- a/daemon/gvfsbackendmtp.c
+++ b/daemon/gvfsbackendmtp.c
@@ -1621,11 +1621,11 @@ do_pull (GVfsBackend *backend,
g_error_free (error);
}
- gboolean dest_is_dir =
- g_file_info_get_file_type (local_info) == G_FILE_TYPE_DIRECTORY;
-
/* Test all the GIO defined failure conditions */
if (dest_exists) {
+ gboolean dest_is_dir =
+ g_file_info_get_file_type (local_info) == G_FILE_TYPE_DIRECTORY;
+
if (flags & G_FILE_COPY_OVERWRITE) {
if (!source_is_dir && dest_is_dir) {
g_vfs_job_failed_literal (G_VFS_JOB (job),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]