From 3b4a590f7fc75a77823580c4c4e19d1c7bd6da52 Mon Sep 17 00:00:00 2001 From: Hadi Ravanbakhsh Date: Wed, 18 Dec 2024 07:47:39 -0800 Subject: [PATCH] Use non-unicode filepaths for Windows when updating mtime. PiperOrigin-RevId: 707548791 --- common/remote_file_oss.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/remote_file_oss.cc b/common/remote_file_oss.cc index 23dd8638..bcee3548 100644 --- a/common/remote_file_oss.cc +++ b/common/remote_file_oss.cc @@ -253,8 +253,8 @@ absl::Status RemotePathTouchExistingFile(std::string_view path) { } #if defined(_MSC_VER) - HANDLE file = CreateFile(path.data(), GENERIC_READ, FILE_SHARE_READ, NULL, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + HANDLE file = CreateFileA(path.data(), GENERIC_READ, FILE_SHARE_READ, NULL, + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (file == INVALID_HANDLE_VALUE) { return absl::InternalError(absl::StrCat("Failed to open ", path, ".")); }