This commit is contained in:
@ -42,6 +42,7 @@ E_SIMPLE2(max_cache_size_reached, warn, true,
|
|||||||
|
|
||||||
cache_size_mgr cache_size_mgr::instance_{};
|
cache_size_mgr cache_size_mgr::instance_{};
|
||||||
|
|
||||||
|
// TODO add timeout
|
||||||
auto cache_size_mgr::expand(std::uint64_t size) -> api_error {
|
auto cache_size_mgr::expand(std::uint64_t size) -> api_error {
|
||||||
if (size == 0U) {
|
if (size == 0U) {
|
||||||
return api_error::success;
|
return api_error::success;
|
||||||
|
@ -604,7 +604,7 @@ auto file_manager::remove_source_and_shrink_cache(
|
|||||||
REPERTORY_USES_FUNCTION_NAME();
|
REPERTORY_USES_FUNCTION_NAME();
|
||||||
|
|
||||||
auto file = utils::file::file{source_path};
|
auto file = utils::file::file{source_path};
|
||||||
auto source_size = file.size().value_or(0U);
|
auto source_size = file.exists() ? file.size().value_or(0U) : 0U;
|
||||||
|
|
||||||
if (not file.remove()) {
|
if (not file.remove()) {
|
||||||
utils::error::raise_api_path_error(function_name, api_path, source_path,
|
utils::error::raise_api_path_error(function_name, api_path, source_path,
|
||||||
|
Reference in New Issue
Block a user