自动生成的棋谱后缀改为 .txt

之前只能用命令
ls *.log | awk -F'.'  '{print $1}'|xargs -i -t mv {}.log {}.txt
把 log 批量改为 txt
This commit is contained in:
CalciteM 2019-07-10 22:52:32 +08:00
parent eb2121046d
commit ffa742881a
1 changed files with 1 additions and 1 deletions

View File

@ -416,7 +416,7 @@ void NineChessWindow::on_actionNew_N_triggered()
file.close();
#ifdef SAVE_CHESSBOOK_WHEN_ACTION_NEW_TRIGGERED
QString path = QDir::currentPath() + "/" + tr("book_") + QString::number(QDateTime::currentDateTime().toTime_t()) + ".log";
QString path = QDir::currentPath() + "/" + tr("book_") + QString::number(QDateTime::currentDateTime().toTime_t()) + ".txt";
QStringListModel* strlist = qobject_cast<QStringListModel*>(ui.listView->model());
if (path.isEmpty() == false && strlist->stringList().size() > 18) {