mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 09:59:59 +03:00
Working on legacy support, incomplete.
This commit is contained in:
parent
ff33d4a1a4
commit
77e8066542
13 changed files with 1061 additions and 0 deletions
|
|
@ -73,3 +73,22 @@ bool ensurePathExists(QString filenamepath)
|
|||
return (dir.mkpath ( a.path() ));
|
||||
}
|
||||
|
||||
bool copyPath(QString src, QString dst)
|
||||
{
|
||||
QDir dir(src);
|
||||
if (!dir.exists())
|
||||
return false;
|
||||
|
||||
foreach (QString d, dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot))
|
||||
{
|
||||
QString dst_path = dst + QDir::separator() + d;
|
||||
dir.mkpath(dst_path);
|
||||
copyPath(src+ QDir::separator() + d, dst_path);
|
||||
}
|
||||
|
||||
foreach (QString f, dir.entryList(QDir::Files))
|
||||
{
|
||||
QFile::copy(src + QDir::separator() + f, dst + QDir::separator() + f);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue