Use utils::file::exists instead of std::filesystem

This commit is contained in:
badaix 2021-12-18 22:48:39 +01:00
parent 98ccc8eded
commit 3f208d260e
5 changed files with 29 additions and 23 deletions

View file

@ -23,10 +23,10 @@
#include "common/aixlog.hpp"
#include "common/snap_exception.hpp"
#include "common/utils.hpp"
#include "common/utils/file_utils.hpp"
#include "common/utils/string_utils.hpp"
// standard headers
#include <filesystem>
#include <regex>
@ -90,10 +90,10 @@ void LibrespotStream::initExeAndPath(const std::string& filename)
{
path_ = "";
exe_ = findExe(filename);
if (!std::filesystem::exists(exe_) || (exe_ == "/"))
if (!utils::file::exists(exe_) || (exe_ == "/"))
{
exe_ = findExe("librespot");
if (!std::filesystem::exists(exe_))
if (!utils::file::exists(exe_))
throw SnapException("librespot not found");
}