From 4aa5bab38d9f997a0968f0a499661dcd6d467f48 Mon Sep 17 00:00:00 2001 From: RickyRister Date: Mon, 23 Dec 2024 02:25:44 -0800 Subject: [PATCH] refactors --- cockatrice/src/client/tabs/tab_replays.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cockatrice/src/client/tabs/tab_replays.cpp b/cockatrice/src/client/tabs/tab_replays.cpp index 89950acab..56e1e4173 100644 --- a/cockatrice/src/client/tabs/tab_replays.cpp +++ b/cockatrice/src/client/tabs/tab_replays.cpp @@ -190,14 +190,14 @@ void TabReplays::openRemoteReplayFinished(const Response &r) void TabReplays::actDownload() { - QString folderPath; + QString dirPath; QModelIndex curLeft = localDirView->selectionModel()->currentIndex(); if (!curLeft.isValid()) - folderPath = localDirModel->rootPath(); + dirPath = localDirModel->rootPath(); else { while (!localDirModel->isDir(curLeft)) curLeft = curLeft.parent(); - folderPath = localDirModel->filePath(curLeft); + dirPath = localDirModel->filePath(curLeft); } const auto curRights = serverDirView->getSelectedReplays(); @@ -210,7 +210,7 @@ void TabReplays::actDownload() } for (const auto curRight : curRights) { - const QString filePath = folderPath + QString("/replay_%1.cor").arg(curRight->replay_id()); + const QString filePath = dirPath + QString("/replay_%1.cor").arg(curRight->replay_id()); Command_ReplayDownload cmd; cmd.set_replay_id(curRight->replay_id());