From e79bbe4c0317a4de1844612a3a9bea773556a61f Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Sun, 14 Oct 2018 10:28:22 -0400 Subject: [PATCH] move extension instead of deleting --- GUI/mainwindow.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GUI/mainwindow.cpp b/GUI/mainwindow.cpp index 1e4e0bf..b4af203 100644 --- a/GUI/mainwindow.cpp +++ b/GUI/mainwindow.cpp @@ -250,6 +250,9 @@ void MainWindow::on_rmvExtenButton_clicked() if (extenCombo->currentText().size() == 0) return; QString extenFileName = extenCombo->currentText().split(":")[0] + "_" + extenCombo->currentText().split(": ")[1] + ".dll"; FreeLibrary(GetModuleHandleW(extenFileName.toStdWString().c_str())); - QFile::remove(extenFileName); + QString removedFileName = extenFileName; + removedFileName.remove(0, removedFileName.indexOf("_")); + QFile::remove(removedFileName); + QFile::rename(extenFileName, removedFileName); ReloadExtensions(); }