fix
This commit is contained in:
		| @@ -176,13 +176,13 @@ auto get_times(std::string_view path) -> std::optional<file_times> { | |||||||
|     file_times ret{}; |     file_times ret{}; | ||||||
|  |  | ||||||
| #if defined(_WIN32) | #if defined(_WIN32) | ||||||
|     auto file_handle = |     auto file_handle = ::CreateFileA( | ||||||
|         ::CreateFileA(std::string{path}.c_str(), GENERIC_READ, |         std::string{path}.c_str(), GENERIC_READ, | ||||||
|                       FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, |         FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, nullptr, | ||||||
|                       nullptr, OPEN_EXISTING, 0U, nullptr); |         OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, nullptr); | ||||||
|     if (file_handle == INVALID_HANDLE_VALUE) { |     if (file_handle == INVALID_HANDLE_VALUE) { | ||||||
|       throw std::runtime_error("failed to get file times|" + std::string{path} + |       throw std::runtime_error("failed to open file to get file times|" + | ||||||
|                                '|' + |                                std::string{path} + '|' + | ||||||
|                                std::to_string(utils::get_last_error_code())); |                                std::to_string(utils::get_last_error_code())); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user