move extension instead of deleting

This commit is contained in:
Akash Mozumdar 2018-10-14 10:28:22 -04:00
parent af34731880
commit e79bbe4c03

View File

@ -250,6 +250,9 @@ void MainWindow::on_rmvExtenButton_clicked()
if (extenCombo->currentText().size() == 0) return; if (extenCombo->currentText().size() == 0) return;
QString extenFileName = extenCombo->currentText().split(":")[0] + "_" + extenCombo->currentText().split(": ")[1] + ".dll"; QString extenFileName = extenCombo->currentText().split(":")[0] + "_" + extenCombo->currentText().split(": ")[1] + ".dll";
FreeLibrary(GetModuleHandleW(extenFileName.toStdWString().c_str())); 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(); ReloadExtensions();
} }