MCPcopy Create free account
hub / github.com/Martchus/syncthingtray / findPwd

Method findPwd

cli/application.cpp:573–596  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

571}
572
573bool Application::findPwd(bool waitForConfigArg)
574{
575 if (waitForConfigArg) {
576 if (!waitForConfig()) {
577 return false;
578 }
579 m_connection.applyRawConfig();
580 }
581
582 // find directory for working directory
583 const QString pwd(QDir::currentPath());
584 int dummy;
585 m_pwd.dirObj = m_connection.findDirInfoByPath(pwd, m_pwd.subDir, dummy);
586 if (m_pwd) {
587 return true;
588 }
589
590 // handle error
591 cerr << Phrases::Error << "The current working directory \"" << pwd.toLocal8Bit().data() << "\" is not (part of) a Syncthing folder.";
592 cerr << Phrases::End << flush;
593 m_requiresMainEventLoop = false;
594 QCoreApplication::exit(2);
595 return false;
596}
597
598void Application::printDir(const RelevantDir &relevantDir) const
599{

Callers

nothing calls this directly

Calls 3

applyRawConfigMethod · 0.80
findDirInfoByPathMethod · 0.80
dataMethod · 0.45

Tested by

no test coverage detected