diff --git a/client/crash_report_database_test.cc b/client/crash_report_database_test.cc index 7760b4a1..55bcf3cd 100644 --- a/client/crash_report_database_test.cc +++ b/client/crash_report_database_test.cc @@ -628,21 +628,21 @@ TEST_F(CrashReportDatabaseTest, RequestUpload) { ASSERT_EQ(pending_reports.size(), 2u); // Check individual reports. - const CrashReportDatabase::Report* expicitly_requested_report; + const CrashReportDatabase::Report* explicitly_requested_report; const CrashReportDatabase::Report* pending_report; if (pending_reports[0].uuid == report_0_uuid) { pending_report = &pending_reports[0]; - expicitly_requested_report = &pending_reports[1]; + explicitly_requested_report = &pending_reports[1]; } else { pending_report = &pending_reports[1]; - expicitly_requested_report = &pending_reports[0]; + explicitly_requested_report = &pending_reports[0]; } EXPECT_EQ(pending_report->uuid, report_0_uuid); EXPECT_FALSE(pending_report->upload_explicitly_requested); - EXPECT_EQ(expicitly_requested_report->uuid, report_1_uuid); - EXPECT_TRUE(expicitly_requested_report->upload_explicitly_requested); + EXPECT_EQ(explicitly_requested_report->uuid, report_1_uuid); + EXPECT_TRUE(explicitly_requested_report->upload_explicitly_requested); // Explicitly requested reports will not have upload_explicitly_requested bit // after getting skipped. diff --git a/util/file/filesystem_posix.cc b/util/file/filesystem_posix.cc index b1f19f62..c2234dae 100644 --- a/util/file/filesystem_posix.cc +++ b/util/file/filesystem_posix.cc @@ -65,6 +65,14 @@ bool LoggingCreateDirectory(const base::FilePath& path, bool MoveFileOrDirectory(const base::FilePath& source, const base::FilePath& dest) { +#if defined(OS_FUCHSIA) + // Fuchsia fails and sets errno to EINVAL if source and dest are the same. + // Upstream bug is ZX-1729. + if (!source.empty() && source == dest) { + return true; + } +#endif // OS_FUCHSIA + if (rename(source.value().c_str(), dest.value().c_str()) != 0) { PLOG(ERROR) << "rename " << source.value().c_str() << ", " << dest.value().c_str();