diff options
| author | Arno <arno@disconnect.de> | 2016-10-01 15:10:32 +0200 | 
|---|---|---|
| committer | Arno <arno@disconnect.de> | 2016-10-01 15:10:32 +0200 | 
| commit | 7a75a5dc83cf0899958a24cb28d3b32f6f42933e (patch) | |
| tree | a004b8217a1068c01c27d2a105848f2f0fdee53b /torrentwidget.cpp | |
| parent | 3bdf9e931dce450f477151d92f7dd8a2171d2224 (diff) | |
| download | ShemovCleaner-7a75a5dc83cf0899958a24cb28d3b32f6f42933e.tar.gz ShemovCleaner-7a75a5dc83cf0899958a24cb28d3b32f6f42933e.tar.bz2 ShemovCleaner-7a75a5dc83cf0899958a24cb28d3b32f6f42933e.zip  | |
Remove source torrent if it already exists in dest
Don't care if it's the same file...
Diffstat (limited to 'torrentwidget.cpp')
| -rw-r--r-- | torrentwidget.cpp | 7 | 
1 files changed, 7 insertions, 0 deletions
diff --git a/torrentwidget.cpp b/torrentwidget.cpp index 9b155cf..e86b3e9 100644 --- a/torrentwidget.cpp +++ b/torrentwidget.cpp @@ -258,6 +258,13 @@ void TorrentWidget::moveFiles(){              bool ok = QFile::rename(fp.absoluteFilePath(), newfn);              if(ok){                  ++ctr; +            }else{ +                QFileInfo nf(newfn); +                if(nf.exists() && nf.isFile()){ +                    //don't care if it's the same file or not... +                    QFile::remove(fp.absoluteFilePath()); +                    ++ctr; +                }              }          }          QString msg = QString(tr("Successfully moved %1 of %2 file(s)")).arg(QString::number(ctr)).arg(QString::number(sel.count()));  | 
