diff options
author | Nelson Benitez Leon <nbenitezl@gmail.com> | 2013-08-16 17:05:18 +0200 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2013-08-16 18:38:38 +0200 |
commit | e296a869fb0889deee545baf18d327314307c8af (patch) | |
tree | 947fe1a27fc04d3b2fa7f1f6d9b9c123a0e5137e | |
parent | 8ff0bf18f9db9ec328b6c0c460ca2d9c462ddbdd (diff) | |
download | nautilus-e296a869fb0889deee545baf18d327314307c8af.tar.gz |
file operations: fix double unref and show invalid filename error dialog
Remove a superflous g_object_unref() call plus show error dialog when
creating a new file with an invalid file name for the destination
file system.
Fixes bug 706131
https://bugzilla.gnome.org/show_bug.cgi?id=706131
-rw-r--r-- | libnautilus-private/nautilus-file-operations.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libnautilus-private/nautilus-file-operations.c b/libnautilus-private/nautilus-file-operations.c index fccccf60d..05601a821 100644 --- a/libnautilus-private/nautilus-file-operations.c +++ b/libnautilus-private/nautilus-file-operations.c @@ -6107,8 +6107,6 @@ create_job (GIOSchedulerJob *io_job, g_assert (dest_fs_type == NULL); dest_fs_type = query_fs_type (job->dest_dir, common->cancellable); - g_object_unref (dest); - if (count == 1) { new_filename = g_strdup (filename); } else { @@ -6146,7 +6144,9 @@ create_job (GIOSchedulerJob *io_job, goto retry; } g_free (new_filename); - } else if (IS_IO_ERROR (error, EXISTS)) { + } + + if (IS_IO_ERROR (error, EXISTS)) { g_object_unref (dest); dest = NULL; filename_base = eel_filename_strip_extension (filename); |