diff --git a/Changelog b/Changelog index dd027bb85..d7c3b0dbd 100644 --- a/Changelog +++ b/Changelog @@ -2,6 +2,7 @@ - BUGFIX: Fix unicode problem in torrent moving code - BUGFIX: Fix possible initialization problem in Web UI - BUGFIX: Fix torrent moving after completion feature + - BUGFIX: Improved empty folder removing code * Sun Apr 18 2010 - Christophe Dumez - v2.2.6 - BUGFIX: Announce to all trackers at once diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 8a2782d74..27b41ce51 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -1970,7 +1970,8 @@ void Bittorrent::addConsoleMessage(QString msg, QString) { const QString new_save_path = QString::fromLocal8Bit(p->path.c_str()); qDebug("Torrent moved from %s to %s", qPrintable(old_save_path), qPrintable(new_save_path)); qDebug("Attempting to remove %s", qPrintable(old_save_path)); - QDir().rmpath(old_save_path); + if(old_save_path != defaultSavePath && old_save_path != defaultTempPath) + QDir().rmdir(old_save_path); if(new_save_path != defaultTempPath) TorrentPersistentData::saveSavePath(h.hash(), new_save_path); emit savePathChanged(h); diff --git a/src/propertieswidget.cpp b/src/propertieswidget.cpp index c30f5564e..b4cec347b 100644 --- a/src/propertieswidget.cpp +++ b/src/propertieswidget.cpp @@ -729,8 +729,6 @@ void PropertiesWidget::renameSelectedFile() { return; } } - // Save savepath - TorrentPersistentData::saveSavePath(h.hash(), savePath.absolutePath()); // Actually move storage if(!BTSession->useTemporaryFolder() || h.is_seed()) h.move_storage(savePath.absolutePath());