After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 504392 - Copying cd's/dvd's using nautilus leaves large iso images in "/var/tmp"
Copying cd's/dvd's using nautilus leaves large iso images in "/var/tmp"
Status: RESOLVED OBSOLETE
Product: nautilus-cd-burner
Classification: Deprecated
Component: cd-burner
2.20.x
Other All
: Normal normal
: ---
Assigned To: Nautilus CD Burner Maintainers
Nautilus CD Burner Maintainers
: 517994 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-12-19 07:06 UTC by Wendy Hu
Modified: 2009-07-29 10:46 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Patch for this bug. (385 bytes, patch)
2007-12-19 07:07 UTC, Wendy Hu
reviewed Details | Review
The modified patch. (691 bytes, patch)
2008-03-14 06:52 UTC, Wendy Hu
none Details | Review
Remove temporary image file on completion. (653 bytes, patch)
2008-10-25 16:25 UTC, Miklos Juhasz
none Details | Review

Description Wendy Hu 2007-12-19 07:06:52 UTC
Please describe the problem:
After inserting a data cd and a desktop icon appearing, right click on it and select "copy". Follow prompts on screen until the new cd has been copied.

Note that after the copying has been completed, the iso image created for the copy remains in "/var/tmp". This could (if burning many different cd's/dvd's) fill the systems partition.
Either nautilus should clean this out when the copy operation has been completed or user should be prompted to manually remove the iso image, if it is no longer required.

Steps to reproduce:
1. Insert a data CD;
2. Right click on the desktop icon of the CD and select "Copy";
3. Check the "/var/tmp" whether there is an iso image left.


Actual results:
There is a big iso image left under the category of "/var/tmp".

Expected results:
If the iso image is no longer required, it should be removed.

Does this happen every time?
Yes.

Other information:
Comment 1 Wendy Hu 2007-12-19 07:07:29 UTC
Created attachment 101237 [details] [review]
Patch for this bug.
Comment 2 Luis Medinas 2008-01-15 00:04:44 UTC
I think this makes perfect sense if the burning went fine.
Comment 3 Wendy Hu 2008-01-15 03:00:59 UTC
anyone can review it and commit if it is OK?
Comment 4 Bastien Nocera 2008-01-15 09:58:21 UTC
(In reply to comment #3)
> anyone can review it and commit if it is OK?

Certainly not, there's a maintainer who happens to be busy these days. Please bide your time.
Comment 5 William Jon McCann 2008-01-21 02:29:28 UTC
So, shouldn't this be:


/* remove temporary file */
if (iso_filename == NULL) {
	remove_file (filename);
}
Comment 6 Cosimo Cecchi 2008-03-06 00:22:27 UTC
*** Bug 517994 has been marked as a duplicate of this bug. ***
Comment 7 Sebastien Bacher 2008-03-12 17:10:46 UTC
there is indication of why the bug should be closed and the 2.22 changelog has no entry which seems to indicate that has been changed
Comment 8 Wendy Hu 2008-03-14 06:52:16 UTC
Created attachment 107271 [details] [review]
The modified patch.
Comment 9 Sebastien Bacher 2008-03-18 13:01:18 UTC
why did you close the bug?
Comment 10 Wendy Hu 2008-05-15 05:59:32 UTC
the patch has not been committed,
who can review and commit it?
thanks.
Comment 11 Wendy Hu 2008-08-07 08:11:03 UTC
In the file "src/ncb-operation.c", there are some codes as follows:
==============================
static void
ncb_operation_finalize (GObject *object)
{
     ......
     
     if (operation->priv->iso != NULL) {
                g_object_unref (operation->priv->iso);
                operation->priv->iso = NULL;
        }

        ncb_operation_temp_files_cleanup (operation);  //Here has removed the large iso images

     ......
}

static void
ncb_operation_temp_files_cleanup (NcbOperation *operation)
{
        operation->priv->files_for_cleanup = g_list_first (operation->priv->files_for_cleanup);

        while (operation->priv->files_for_cleanup != NULL) {
                char *filename = operation->priv->files_for_cleanup->data;

                remove_file (filename);
                g_free (filename);

                operation->priv->files_for_cleanup = g_list_remove (operation->priv->files_for_cleanup,
                                                                    operation->priv->files_for_cleanup->data);
        }
}


==============================
ncb_operation_temp_files_cleanup
So this bug can be closed.
Comment 12 Wendy Hu 2008-08-07 08:12:13 UTC
And the patch for this bug should be removed from the spec.
Comment 13 Wendy Hu 2008-08-07 09:46:28 UTC
Please ignore my comment above.

Because the function "nautilus_burn_iso_graft_free" in file "src/make-iso.c" really do the removing work.

==============================

nautilus_burn_iso_graft_free (NautilusBurnIsoGraft *graft,
                              gboolean              cleanup)
{
        GList *l;

        g_ptr_array_foreach (graft->array, (GFunc)g_free, NULL);
        g_ptr_array_free (graft->array, TRUE);

        for (l = graft->remove_files; l != NULL; l = l->next) {
                if (cleanup && l->data != NULL) {
                        g_remove ((char *)l->data);
                }
                g_free (l->data);
        }
        g_list_free (graft->remove_files);

        g_free (graft);
        graft = NULL;
}
==============================

Comment 14 Miklos Juhasz 2008-10-25 16:24:13 UTC
Calling remove_file as in the first patch removes the image right after the creation.
It should be removed only if the disc copy operation is finished and we do not want to make another copy. The best way would be to remove it when the operation gets finalized.
You are right, the ncb_operation_temp_files_cleanup function will do the job, you only have to add the iso filename to list of temporary files.

/* If the iso is temporary and it still exists (i.e. cancel button was not
   hit while creating the iso) schedule it for removal */
if (iso_filename == NULL && g_file_test (filename, G_FILE_TEST_EXISTS)) {
        ncb_operation_temp_files_add (operation, g_strdup (filename));
}


I discovered another poblem: toc_filename pointer was not initialized causing segfault if you selected image file as target but pressed cancel on the file chooser dialog. Not a big deal, toc_filename = NULL; line must be added.
Comment 15 Miklos Juhasz 2008-10-25 16:25:37 UTC
Created attachment 121351 [details] [review]
Remove temporary image file on completion.
Comment 16 Miklos Juhasz 2008-12-13 13:29:47 UTC
The patch above works properly, I tested it on different machines. Is there any chance that this bug will be fixed in near future? It has been open for a year.
Comment 17 Bastien Nocera 2009-07-29 10:46:58 UTC
nautilus-cd-burner has been replaced by Brasero in the GNOME 2.26 release. If your bug still applies to Brasero, please feel free to re-open the bug, and reassign it to brasero itself.