Skip to content

Commit

Permalink
[mtouch/mmp] When copying a directory hierarchy, delete the target fi…
Browse files Browse the repository at this point in the history
…le if it exists.

The copyfile method does not like copying files over an existing file, and
sometimes it may end up showing an error.
  • Loading branch information
rolfbjarne committed Apr 27, 2020
1 parent 153db58 commit 2454916
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/common/FileCopier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ static CopyFileResult CopyFileCallback (CopyFileWhat what, CopyFileStep stage, I
else if (stage == CopyFileStep.Err) {
Log (1, "Could not copy the file '{0}' to '{1}'", source, target);
return CopyFileResult.Quit;
} else if (stage == CopyFileStep.Start) {
if (File.Exists (target) || Directory.Exists (target)) {
Log (1, "Deleted target {0}, it's not up-to-date", target);
// This callback won't be called for directories, but we can get here for symlinks to directories.
File.Delete (target);
}
}
return CopyFileResult.Continue;
} else {
Expand Down

5 comments on commit 2454916

@xamarin-release-manager
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 Device tests completed (Failed) on TvOS on Azure DevOps(TvOS): Html Report 🔥

🔥 Tests failed catastrophically on TvOS (no summary found)

@xamarin-release-manager
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 Device tests completed (Failed) on iOS32b on Azure DevOps(iOS32b): Html Report 🔥

🔥 Tests failed catastrophically on iOS32b (no summary found)

@xamarin-release-manager
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 Device tests completed (Failed) on iOS on Azure DevOps(iOS): Html Report 🔥

🔥 Tests failed catastrophically on iOS (no summary found)

@xamarin-release-manager
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚧 Experimental DDFun pipeline

🔥 Device tests completed (Failed) on iOS-DDFun on Azure DevOps(iOS-DDFun) 🔥

🔥 Tests failed catastrophically (no summary found)

@xamarin-release-manager
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.