-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.cpp | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp index 795feaf..c6de5e6 100644 --- a/core/multimedia/opieplayer/playlistwidget.cpp +++ b/core/multimedia/opieplayer/playlistwidget.cpp | |||
@@ -1259,25 +1259,25 @@ void PlayListWidget::writem3u() { | |||
1259 | // qDebug( filename ); | 1259 | // qDebug( filename ); |
1260 | if( name.find("/",0,true) != -1) {// assume they specify a file path | 1260 | if( name.find("/",0,true) != -1) {// assume they specify a file path |
1261 | filename = name; | 1261 | filename = name; |
1262 | name = name.right(name.length()- name.findRev("/",-1,true) - 1 ); | 1262 | name = name.right(name.length()- name.findRev("/",-1,true) - 1 ); |
1263 | } | 1263 | } |
1264 | else //otherwise dump it somewhere noticable | 1264 | else //otherwise dump it somewhere noticable |
1265 | filename = QPEApplication::documentDir() + "/" + name; | 1265 | filename = QPEApplication::documentDir() + "/" + name; |
1266 | 1266 | ||
1267 | if( filename.right( 3 ) != "m3u" ) //needs filename extension | 1267 | if( filename.right( 3 ) != "m3u" ) //needs filename extension |
1268 | filename += ".m3u"; | 1268 | filename += ".m3u"; |
1269 | 1269 | ||
1270 | if( d->selectedFiles->first()) { | 1270 | if( d->selectedFiles->first()) { |
1271 | m3uList = new Om3u(filename, IO_ReadWrite); | 1271 | m3uList = new Om3u(filename, IO_ReadWrite | IO_Truncate); |
1272 | 1272 | ||
1273 | do { | 1273 | do { |
1274 | m3uList->add( d->selectedFiles->current()->file()); | 1274 | m3uList->add( d->selectedFiles->current()->file()); |
1275 | } | 1275 | } |
1276 | while ( d->selectedFiles->next() ); | 1276 | while ( d->selectedFiles->next() ); |
1277 | // qDebug( list ); | 1277 | // qDebug( list ); |
1278 | m3uList->write(); | 1278 | m3uList->write(); |
1279 | m3uList->close(); | 1279 | m3uList->close(); |
1280 | if(m3uList) delete m3uList; | 1280 | if(m3uList) delete m3uList; |
1281 | 1281 | ||
1282 | if(fileDlg) delete fileDlg; | 1282 | if(fileDlg) delete fileDlg; |
1283 | 1283 | ||
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index e9615f1..580460e 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -732,25 +732,25 @@ void PlayListWidget::writem3u() { | |||
732 | // qDebug( filename ); | 732 | // qDebug( filename ); |
733 | if( name.find("/",0,true) != -1) {// assume they specify a file path | 733 | if( name.find("/",0,true) != -1) {// assume they specify a file path |
734 | filename = name; | 734 | filename = name; |
735 | name = name.right(name.length()- name.findRev("/",-1,true) - 1 ); | 735 | name = name.right(name.length()- name.findRev("/",-1,true) - 1 ); |
736 | } | 736 | } |
737 | else //otherwise dump it somewhere noticable | 737 | else //otherwise dump it somewhere noticable |
738 | filename = QPEApplication::documentDir() + "/" + name; | 738 | filename = QPEApplication::documentDir() + "/" + name; |
739 | 739 | ||
740 | if( filename.right( 3 ) != "m3u" ) //needs filename extension | 740 | if( filename.right( 3 ) != "m3u" ) //needs filename extension |
741 | filename += ".m3u"; | 741 | filename += ".m3u"; |
742 | 742 | ||
743 | if( d->selectedFiles->first()) { //ramble through playlist view | 743 | if( d->selectedFiles->first()) { //ramble through playlist view |
744 | m3uList = new Om3u( filename, IO_ReadWrite); | 744 | m3uList = new Om3u( filename, IO_ReadWrite | IO_Truncate); |
745 | 745 | ||
746 | do { | 746 | do { |
747 | m3uList->add( d->selectedFiles->current()->file()); | 747 | m3uList->add( d->selectedFiles->current()->file()); |
748 | } | 748 | } |
749 | while ( d->selectedFiles->next() ); | 749 | while ( d->selectedFiles->next() ); |
750 | // qDebug( list ); | 750 | // qDebug( list ); |
751 | m3uList->write(); | 751 | m3uList->write(); |
752 | m3uList->close(); | 752 | m3uList->close(); |
753 | delete m3uList; | 753 | delete m3uList; |
754 | 754 | ||
755 | delete fileDlg; | 755 | delete fileDlg; |
756 | 756 | ||