You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.6 KiB

  1. From 7071316114b7d196808d943ce654b355927e73e1 Mon Sep 17 00:00:00 2001
  2. From: Karlchen <k_straussberger@netzland.net>
  3. Date: Mon, 23 Aug 2021 09:04:36 +0200
  4. Subject: [PATCH] Fix linkage error in on aarch64 with g++-10
  5. fixes #1674
  6. ---
  7. src/content/content_manager.cc | 8 ++++----
  8. 1 file changed, 4 insertions(+), 4 deletions(-)
  9. --- a/src/content/content_manager.cc
  10. +++ b/src/content/content_manager.cc
  11. @@ -622,17 +622,17 @@ void ContentManager::_rescanDirectory(co
  12. std::error_code ec;
  13. auto rootDir = fs::directory_entry(location, ec);
  14. - fs::directory_iterator dIter;
  15. + std::unique_ptr<fs::directory_iterator> dIter;
  16. if (!ec && rootDir.exists(ec) && rootDir.is_directory(ec)) {
  17. - dIter = fs::directory_iterator(location, ec);
  18. + dIter = std::make_unique<fs::directory_iterator>(location, ec);
  19. if (ec) {
  20. log_error("_rescanDirectory: Failed to iterate {}, {}", location.c_str(), ec.message());
  21. }
  22. } else {
  23. log_error("Could not open {}: {}", location.c_str(), ec.message());
  24. }
  25. - if (ec) {
  26. + if (ec || !dIter) {
  27. if (adir->persistent()) {
  28. removeObject(adir, containerID, false);
  29. if (location == adir->getLocation()) {
  30. @@ -673,7 +673,7 @@ void ContentManager::_rescanDirectory(co
  31. adir->setCurrentLMT(location, std::chrono::seconds::zero());
  32. std::shared_ptr<CdsObject> firstObject;
  33. - for (auto&& dirEnt : dIter) {
  34. + for (auto&& dirEnt : *dIter) {
  35. auto&& newPath = dirEnt.path();
  36. auto&& name = newPath.filename().string();
  37. if (name[0] == '.' && !asSetting.hidden) {