MCPcopy Create free account
hub / github.com/TheAssassin/AppImageLauncher / daemonDirectoriesToWatch

Function daemonDirectoriesToWatch

src/shared/shared.cpp:441–470  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

439}
440
441QDirSet daemonDirectoriesToWatch(const std::shared_ptr<QSettings>& config) {
442 auto watchedDirectories = QDirSet();
443
444 // of course we need to watch the main integration directory
445 const auto defaultDestination = integratedAppImagesDestination();
446 watchedDirectories.insert(defaultDestination);
447
448 // however, there's likely additional ones to watch, like a system-wide Applications directory
449 {
450 bool monitorMountedFilesystems = config != nullptr && shallMonitorMountedFilesystems(config);
451
452 const auto additionalDirs = additionalAppImagesLocations(monitorMountedFilesystems);
453
454 for (const auto& d : additionalDirs) {
455 watchedDirectories.insert(QDir(d).absolutePath());
456 }
457 }
458
459 // also, we should include additional directories from the config file
460 {
461 const auto configProvidedDirectories = getAdditionalDirectoriesFromConfig(config);
462
463 std::copy(
464 configProvidedDirectories.begin(), configProvidedDirectories.end(),
465 std::inserter(watchedDirectories, watchedDirectories.end())
466 );
467 }
468
469 return watchedDirectories;
470}
471
472QString buildPathToIntegratedAppImage(const QString& pathToAppImage) {
473 // if type 2 AppImage, we can build a "content-aware" filename

Callers 2

mainFunction · 0.85
mainFunction · 0.85

Tested by

no test coverage detected