aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/include
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2023-09-12 08:03:46 -0400
committerGitHub <[email protected]>2023-09-12 14:03:46 +0200
commitf463686b9621b8c744e2dcb0d018ad507716d499 (patch)
tree7cf50625dbfe3b731131b779c6286ae9ca6423d7 /src/zencore/include
parentgracefully handle errors when writing cache log (#391) (diff)
downloadzen-f463686b9621b8c744e2dcb0d018ad507716d499.tar.xz
zen-f463686b9621b8c744e2dcb0d018ad507716d499.zip
Make sure error logging or destructors don't throw exception when trying to get file name from handle (#393)
- Bugfix: Make sure error logging or destructors don't throw exception when trying to get file name from handle
Diffstat (limited to 'src/zencore/include')
-rw-r--r--src/zencore/include/zencore/filesystem.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/zencore/include/zencore/filesystem.h b/src/zencore/include/zencore/filesystem.h
index 37a562664..a78edd16b 100644
--- a/src/zencore/include/zencore/filesystem.h
+++ b/src/zencore/include/zencore/filesystem.h
@@ -34,6 +34,10 @@ ZENCORE_API bool CleanDirectory(const std::filesystem::path& dir);
*/
ZENCORE_API std::filesystem::path PathFromHandle(void* NativeHandle);
+/** Map native file handle to a path
+ */
+ZENCORE_API std::filesystem::path PathFromHandle(void* NativeHandle, std::error_code& Ec);
+
/** Query file size from native file handle
*/
ZENCORE_API uint64_t FileSizeFromHandle(void* NativeHandle);