mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 05:07:46 +02:00
Only call on interactive uses
Signed-off-by: Yihe Li <winmikedows@hotmail.com>
This commit is contained in:
@ -388,6 +388,17 @@ void BaseInstance::setName(QString val)
|
||||
emit propertiesChanged(this);
|
||||
}
|
||||
|
||||
bool BaseInstance::syncInstanceDirName() const
|
||||
{
|
||||
auto oldRoot = instanceRoot();
|
||||
auto newRoot = FS::PathCombine(QFileInfo(oldRoot).dir().absolutePath(), name());
|
||||
if (oldRoot == newRoot)
|
||||
return true;
|
||||
if (!QFile::rename(oldRoot, newRoot))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
QString BaseInstance::name() const
|
||||
{
|
||||
return m_settings->get("name").toString();
|
||||
|
Reference in New Issue
Block a user