Skip to content

Commit

Permalink
path_discovery: Log warnings if path discovery could not find suitabl…
Browse files Browse the repository at this point in the history
…e paths for storage_backed_temporary_files_directory() and memory_backed_temporary_files_directory().
  • Loading branch information
ned14 committed Sep 7, 2022
1 parent 90fdf0e commit ae7f9c5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions include/llfio/v2.0/detail/impl/path_discovery.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,20 @@ namespace path_discovery
LLFIO_LOG_FATAL(nullptr, "path_discovery::verified_temporary_directories() saw unknown exception throw");
abort();
}
#ifndef LLFIO_PATH_DISCOVERY_DISABLE_STORAGE_BACKED_TEMPORARY_FILES_DIRECTORY_WARNING
if(!ps.storage_backed.is_valid())
{
LLFIO_LOG_WARN(nullptr, "path_discovery:verified_temporary_directories() found no suitable path for storage_backed_temporary_files_directory(), creation "
"of storage backed temporary files will fail with bad_file_descriptor!");
}
#endif
#ifndef LLFIO_PATH_DISCOVERY_DISABLE_MEMORY_BACKED_TEMPORARY_FILES_DIRECTORY_WARNING
if(!ps.memory_backed.is_valid())
{
LLFIO_LOG_WARN(nullptr, "path_discovery:verified_temporary_directories() found no suitable path for memory_backed_temporary_files_directory(), creation "
"of memory backed temporary files will fail with bad_file_descriptor!");
}
#endif
return ps.verified;
}

Expand Down

0 comments on commit ae7f9c5

Please sign in to comment.