LOGE(SIM_DAEMON, "Path doesn't exist: %s", path.c_str());
return "";
}
-
- path = fs::read_symlink(fs::path(path)).string();
-
+ if (fs::is_symlink(path)) {
+ path = fs::read_symlink(path).string();
+ }
if (path.empty()) {
LOGE(SIM_DAEMON, "Bad CA path. Does this directory exist: %s ?", path.c_str());
}
p_char p_pkg_id_ca(pkg_id_ca, &free);
std::string ca_pkg_path = getCaFullPathFromPkgId(pkg_id_ca);
- if (ca_pkg_path.empty()) {
+ if (!fs::exists(ca_pkg_path)) {
LOGE(SIM_DAEMON, "Error while loading client's path");
return false;
}