Skip to content

Commit ae7f9c5

Browse files
committed
path_discovery: Log warnings if path discovery could not find suitable paths for storage_backed_temporary_files_directory() and memory_backed_temporary_files_directory().
1 parent 90fdf0e commit ae7f9c5

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

include/llfio/v2.0/detail/impl/path_discovery.ipp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,20 @@ namespace path_discovery
263263
LLFIO_LOG_FATAL(nullptr, "path_discovery::verified_temporary_directories() saw unknown exception throw");
264264
abort();
265265
}
266+
#ifndef LLFIO_PATH_DISCOVERY_DISABLE_STORAGE_BACKED_TEMPORARY_FILES_DIRECTORY_WARNING
267+
if(!ps.storage_backed.is_valid())
268+
{
269+
LLFIO_LOG_WARN(nullptr, "path_discovery:verified_temporary_directories() found no suitable path for storage_backed_temporary_files_directory(), creation "
270+
"of storage backed temporary files will fail with bad_file_descriptor!");
271+
}
272+
#endif
273+
#ifndef LLFIO_PATH_DISCOVERY_DISABLE_MEMORY_BACKED_TEMPORARY_FILES_DIRECTORY_WARNING
274+
if(!ps.memory_backed.is_valid())
275+
{
276+
LLFIO_LOG_WARN(nullptr, "path_discovery:verified_temporary_directories() found no suitable path for memory_backed_temporary_files_directory(), creation "
277+
"of memory backed temporary files will fail with bad_file_descriptor!");
278+
}
279+
#endif
266280
return ps.verified;
267281
}
268282

0 commit comments

Comments
 (0)