commit c90ac9c704a13f1b90b66030972c900daf1cca58
Author: Adam Broschinski <[email protected]>
Date:   Wed Apr 14 21:14:03 2010 +0200

    Use 256 byte long filenames on shuffle3g
    
    Corrects the length of the string for the path when writing to the
    shuffle, it was 64 now is the correct value of 256.

 src/itdb_itunesdb.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c
index e6e92f5..8ceaad6 100644
--- a/src/itdb_itunesdb.c
+++ b/src/itdb_itunesdb.c
@@ -6165,9 +6165,8 @@ static gboolean write_rths (WContents *cts, Itdb_Track 
*track)
 
        /* Prep the path */
        /* Correct this if the path field changes length */
-       path = g_strndup (track->ipod_path, 64);
+       path = g_strndup (track->ipod_path, 256);
        g_strdelimit (path, ":", '/');
-       padlength = 256-strlen(path);
 
        put_header (cts, "rths");
        put32lint (cts, -1); /* Length of header to be added later */
@@ -6180,7 +6179,7 @@ static gboolean write_rths (WContents *cts, Itdb_Track 
*track)
        /* If the length of this field changes make sure to correct the
           g_strndup above */
        put_string (cts, path); /* Path to the song */
-       for (; padlength > 0; padlength--)
+       for (padlength = 256-strlen (path); padlength > 0; padlength--)
                put8int (cts, 0);
 
        put32_n0 (cts, 1); /* Unknown */

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to