refactor: make complete list of links to make and send that.

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
Rachel Powers
2023-02-08 12:36:15 -08:00
parent 6d160a7b7e
commit 8ba51c7900
5 changed files with 295 additions and 116 deletions

View File

@ -66,12 +66,17 @@ class LinkTask : public Task {
qDebug() << "EXPECTED: Link failure, Windows requires permissions for symlinks";
qDebug() << "atempting to run with privelage";
connect(m_lnk, &FS::create_link::finishedPrivlaged, this, [&](){
emitSucceeded();
connect(m_lnk, &FS::create_link::finishedPrivlaged, this, [&](bool gotResults){
if (gotResults) {
emitSucceeded();
} else {
qDebug() << "Privlaged run exited without results!";
emitFailed();
}
});
m_lnk->runPrivlaged();
} else {
qDebug() << "Link Failed!" << m_lnk->getOSError().value() << m_lnk->getOSError().message().c_str();
qDebug() << "Link Failed!" << m_lnk->getOSError().value() << m_lnk->getOSError().message().c_str();
}
#else
qDebug() << "Link Failed!" << m_lnk->getOSError().value() << m_lnk->getOSError().message().c_str();