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 520046 - copying files to full iPod leaves 0-byte files scattered on the device
copying files to full iPod leaves 0-byte files scattered on the device
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: iPod
0.11.x
Other All
: Normal minor
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
: 556754 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-03-03 08:22 UTC by GMoney
Modified: 2010-05-22 11:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proof of concept patch against rb-removable-media-source.c fixing the bug. (2.12 KB, patch)
2009-11-10 05:15 UTC, Kim Nguyễn
needs-work Details | Review

Description GMoney 2008-03-03 08:22:33 UTC
Please describe the problem:
Attempting to copy files to an iPod without enough space left will leave 0-byte copies of the files in the /iPod_Control/Music hierarchy.

Steps to reproduce:
1. Attempt to copy files to a filled iPod.
2. The files will fail to copy to the iPod (with an error message for every single file, but that's another bug)


Actual results:
0-byte placeholders with the filenames of the non-copied files will appear scattered about in /iPod_Control/Music/foo

Expected results:
No 0-byte files should appear.  (This is presumably taking up some small amount of space on the iPod as well so it would eventually cause a more serious problem.)

Does this happen every time?
Not sure.

Other information:
8GB nano of the last "long" shaped generation, Ubuntu 7.10.  iPod was configured with iTunes/win32.
Comment 1 Sebastien Bacher 2008-11-07 08:57:29 UTC
*** Bug 556754 has been marked as a duplicate of this bug. ***
Comment 2 Brian J. Murrell 2009-11-07 02:41:36 UTC
See a description of his problem and a solution outline at http://www.mail-archive.com/rhythmbox-devel@gnome.org/msg06242.html
Comment 3 Kim Nguyễn 2009-11-10 05:15:32 UTC
Created attachment 147353 [details] [review]
proof of concept patch against rb-removable-media-source.c fixing the bug.
Comment 4 Jonathan Matthew 2009-12-20 06:09:10 UTC
Review of attachment 147353 [details] [review]:

not sure why it took me so long to get to this - I thought I had some concerns about it, but it turns out I don't.

::: sources/rb-removable-media-source.c
@@ +319,3 @@
+/* from plugins/ipod/ipod-helpers.c */
+
+static guint64 get_fs_property (GFile *file, const char *attr)

Rather than having two copies of this, we should just have one in lib/rb-file-helpers.c

@@ +350,3 @@
+
+	/* Check remaining space on the destination device */
+	guint64 size = 0;

variable declarations go at the top of the block, not for any particular reason, but for consistency

@@ +351,3 @@
+	/* Check remaining space on the destination device */
+	guint64 size = 0;
+	for (l = entries; l != NULL; l = l->next){

likewise a space between ) and {

@@ +364,3 @@
+	RBRemovableMediaSourcePrivate *priv;
+	priv = REMOVABLE_MEDIA_SOURCE_GET_PRIVATE(source);
+	GFile * root = g_mount_get_root(priv->mount);

.. and everywhere between functions and their arguments

@@ +370,3 @@
+	if (size > dest_size){
+		char * mount_name = g_mount_get_name(priv->mount);
+		rb_error_dialog (NULL, _("Error transferring tracks"), _("Not enough space in %s"), mount_name);

should include some details here - at minimum, the amount of additional space required on the device
Comment 5 Jonathan Matthew 2010-05-22 11:56:42 UTC
fixed in commit 0c2876b4 - now the transfer just stops when the device is full.