1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-09-16 09:26:28 +02:00

Copy imported maps

This commit is contained in:
George King
2025-07-28 20:27:02 +02:00
committed by GitHub
parent be787ec16d
commit e7ae41bcb8

View File

@@ -1057,8 +1057,11 @@ void CModListView::installMaps(QStringList maps)
for(QString map : maps)
{
QString destFile = destDir + map.section('/', -1, -1);
logGlobal->info("Importing map '%s'", map.toStdString());
QFile(map).rename(destDir + map.section('/', -1, -1));
if (!QFile::copy(map, destFile))
logGlobal->warn("Failed to copy map '%s' to '%s'", map.toStdString(), destFile.toStdString());
}
}