Skip to content

Commit

Permalink
No public description
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 705251978
  • Loading branch information
hadi88 authored and copybara-github committed Dec 11, 2024
1 parent 4c740a0 commit e129fb0
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions common/remote_file_oss.cc
Original file line number Diff line number Diff line change
Expand Up @@ -247,15 +247,9 @@ absl::Status RemotePathTouchExistingFile(std::string_view path) {
return absl::InvalidArgumentError(
absl::StrCat("path: ", std::string(path), " does not exist."));
}
std::error_code error;
std::filesystem::last_write_time(
path, std::filesystem::file_time_type::clock::now(), error);
if (error) {
return absl::UnknownError(absl::StrCat(
"filesystem::last_write_time() failed, path: ", std::string(path),
", error: ", error.message()));
}
return absl::OkStatus();
if (0 == utimes(path.data(), nullptr)) return absl::OkStatus();
return absl::InternalError(
absl::StrCat("Failed to set mtime for ", path, " (errno ", errno, ")."));
}

absl::Status RemotePathDelete(std::string_view path, bool recursively) {
Expand Down

0 comments on commit e129fb0

Please sign in to comment.