summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoss Lagerwall <rosslagerwall@gmail.com>2014-09-13 13:59:19 +0100
committerRoss Lagerwall <rosslagerwall@gmail.com>2014-09-13 13:59:19 +0100
commit50a5d4c1de2997cfebc14d37e49fe54658cf1678 (patch)
treedf1ff23c45034895bfab4d1865d0a3e3b378f145
parent627ef9b2a62c8a97e95ddfcc95c054cb7e830d81 (diff)
downloadgvfs-50a5d4c1de2997cfebc14d37e49fe54658cf1678.tar.gz
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
-rw-r--r--daemon/gvfsbackendmtp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/daemon/gvfsbackendmtp.c b/daemon/gvfsbackendmtp.c
index 2c526229..e049233c 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),