summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Holmgren <magnushol@gmail.com>2008-06-24 20:44:45 +0000
committerMagnus Holmgren <magnushol@gmail.com>2008-06-24 20:44:45 +0000
commit82ed56bf59bc15d786c5280972789999e24d759b (patch)
tree17d987de1c14155c0133ceac77bd0200c659a2b8
parent349c14c26dc7d06ec71e19008a7e02cdd85d5606 (diff)
downloadrockbox-82ed56bf59bc15d786c5280972789999e24d759b.zip
rockbox-82ed56bf59bc15d786c5280972789999e24d759b.tar.gz
rockbox-82ed56bf59bc15d786c5280972789999e24d759b.tar.bz2
rockbox-82ed56bf59bc15d786c5280972789999e24d759b.tar.xz
When saving a .m3u8 playlist, include a byte order mark (BOM), as some applications require it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17786 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/playlist.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 83bce90..fa448a0 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -3420,6 +3420,12 @@ int playlist_save(struct playlist_info* playlist, char *filename)
display_playlist_count(count, ID2P(LANG_PLAYLIST_SAVE_COUNT), false);
cpu_boost(true);
+
+ if (is_m3u8(path))
+ {
+ /* some applications require a BOM to read the file properly */
+ write(fd, BOM, BOM_SIZE);
+ }
index = playlist->first_index;
for (i=0; i<playlist->amount; i++)