From 273725d9dc86626182cf8af4b8fbabfa3df56826 Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Wed, 18 Jun 2014 23:41:52 +0300 Subject: [PATCH] Fix file renaming. --- src/addnewtorrentdialog.cpp | 4 ++-- src/properties/propertieswidget.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/addnewtorrentdialog.cpp b/src/addnewtorrentdialog.cpp index a117cbfe1..d98a9d375 100644 --- a/src/addnewtorrentdialog.cpp +++ b/src/addnewtorrentdialog.cpp @@ -403,7 +403,7 @@ void AddNewTorrentDialog::renameSelectedFile() qDebug("Name did not change"); return; } - new_name = fsutils::expandPathAbs(new_name); + new_name = fsutils::expandPath(new_name); qDebug("New name: %s", qPrintable(new_name)); // Check if that name is already used for (int i=0; inum_files(); ++i) { @@ -456,7 +456,7 @@ void AddNewTorrentDialog::renameSelectedFile() if (current_name.startsWith(old_path)) { QString new_name = current_name; new_name.replace(0, old_path.length(), new_path); - new_name = fsutils::expandPathAbs(new_name); + new_name = fsutils::expandPath(new_name); qDebug("Rename %s to %s", qPrintable(current_name), qPrintable(new_name)); // Rename in files_path m_filesPath.replace(i, new_name); diff --git a/src/properties/propertieswidget.cpp b/src/properties/propertieswidget.cpp index a92199fe6..9ecc836e9 100644 --- a/src/properties/propertieswidget.cpp +++ b/src/properties/propertieswidget.cpp @@ -564,7 +564,7 @@ void PropertiesWidget::renameSelectedFile() { qDebug("Name did not change"); return; } - new_name = fsutils::expandPathAbs(new_name); + new_name = fsutils::expandPath(new_name); // Check if that name is already used for (int i=0; i