summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/playlistwidget.cpp2
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp2
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
@@ -1255,33 +1255,33 @@ void PlayListWidget::writem3u() {
Om3u *m3uList;
if( fileDlg->result() == 1 ) {
name = fileDlg->text();
// qDebug( filename );
if( name.find("/",0,true) != -1) {// assume they specify a file path
filename = name;
name = name.right(name.length()- name.findRev("/",-1,true) - 1 );
}
else //otherwise dump it somewhere noticable
filename = QPEApplication::documentDir() + "/" + name;
if( filename.right( 3 ) != "m3u" ) //needs filename extension
filename += ".m3u";
if( d->selectedFiles->first()) {
- m3uList = new Om3u(filename, IO_ReadWrite);
+ m3uList = new Om3u(filename, IO_ReadWrite | IO_Truncate);
do {
m3uList->add( d->selectedFiles->current()->file());
}
while ( d->selectedFiles->next() );
// qDebug( list );
m3uList->write();
m3uList->close();
if(m3uList) delete m3uList;
if(fileDlg) delete fileDlg;
DocLnk lnk;
lnk.setFile( filename);
lnk.setIcon("opieplayer2/playlist2");
lnk.setName( name); //sets file name
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
@@ -728,33 +728,33 @@ void PlayListWidget::writem3u() {
Om3u *m3uList;
if( fileDlg->result() == 1 ) {
name = fileDlg->text();
// qDebug( filename );
if( name.find("/",0,true) != -1) {// assume they specify a file path
filename = name;
name = name.right(name.length()- name.findRev("/",-1,true) - 1 );
}
else //otherwise dump it somewhere noticable
filename = QPEApplication::documentDir() + "/" + name;
if( filename.right( 3 ) != "m3u" ) //needs filename extension
filename += ".m3u";
if( d->selectedFiles->first()) { //ramble through playlist view
- m3uList = new Om3u( filename, IO_ReadWrite);
+ m3uList = new Om3u( filename, IO_ReadWrite | IO_Truncate);
do {
m3uList->add( d->selectedFiles->current()->file());
}
while ( d->selectedFiles->next() );
// qDebug( list );
m3uList->write();
m3uList->close();
delete m3uList;
delete fileDlg;
DocLnk lnk;
lnk.setFile( filename);
lnk.setIcon("opieplayer2/playlist2");
lnk.setName( name); //sets file name