mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-31 23:27:43 +00:00
Add some log for the GetFileLength function (#5330)
This commit is contained in:
parent
cb57c100e6
commit
8d4740b39c
1 changed files with 4 additions and 0 deletions
|
|
@ -195,6 +195,10 @@ class WindowsEnv : public Env {
|
|||
wil::unique_hfile file_handle{
|
||||
CreateFileW(file_path, FILE_READ_ATTRIBUTES, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL)};
|
||||
#endif
|
||||
if (file_handle.get() == INVALID_HANDLE_VALUE) {
|
||||
const int err = GetLastError();
|
||||
return ORT_MAKE_STATUS(ONNXRUNTIME, FAIL, "open file ", ToMBString(file_path), " fail, errcode = ", err);
|
||||
}
|
||||
LARGE_INTEGER filesize;
|
||||
if (!GetFileSizeEx(file_handle.get(), &filesize)) {
|
||||
const int err = GetLastError();
|
||||
|
|
|
|||
Loading…
Reference in a new issue