Filter out invalid chars
Signed-off-by: Yihe Li <winmikedows@hotmail.com>
This commit is contained in:
parent
8fea37b8b7
commit
294448a01e
3 changed files with 6 additions and 6 deletions
|
@ -388,10 +388,9 @@ void BaseInstance::setName(QString val)
|
|||
emit propertiesChanged(this);
|
||||
}
|
||||
|
||||
bool BaseInstance::syncInstanceDirName() const
|
||||
bool BaseInstance::syncInstanceDirName(const QString& newRoot) const
|
||||
{
|
||||
auto oldRoot = instanceRoot();
|
||||
auto newRoot = FS::PathCombine(QFileInfo(oldRoot).dir().absolutePath(), name());
|
||||
if (oldRoot == newRoot)
|
||||
return true;
|
||||
if (!QFile::rename(oldRoot, newRoot))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue