Skip to content

Commit

Permalink
Use non-unicode filepaths for Windows when updating mtime.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 707548791
  • Loading branch information
hadi88 authored and copybara-github committed Dec 18, 2024
1 parent a31e093 commit 3b4a590
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/remote_file_oss.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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, "."));
}
Expand Down

0 comments on commit 3b4a590

Please sign in to comment.