[Lldb-commits] [lldb] [lldb] Skip remote PutFile when MD5 hashes equal (PR #88812)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Thu Apr 18 12:28:51 PDT 2024
================
@@ -1197,6 +1197,32 @@ Status Platform::PutFile(const FileSpec &source, const FileSpec &destination,
if (!source_file)
return Status(source_file.takeError());
Status error;
+
+ bool requires_upload = true;
+ uint64_t dest_md5_low, dest_md5_high;
+ bool success = CalculateMD5(destination, dest_md5_low, dest_md5_high);
+ if (!success) {
+ LLDB_LOGF(log, "[PutFile] couldn't get md5 sum of destination");
+ } else {
+ auto local_md5 = llvm::sys::fs::md5_contents(source.GetPath());
----------------
JDevlieghere wrote:
It's not obvious from the right hand side what the return value is. Case in point, it returns an `ErrorOr<MD5::MD5Result>` and if I hadn't looked it up I wouldn't have noticed we're not actually logging the error.
https://github.com/llvm/llvm-project/pull/88812
More information about the lldb-commits
mailing list