summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.BuildTasks/CopyWithTokenSubstitution.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-12-27 07:05:51 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2009-12-27 07:05:51 -0800
commitcf48d319968262e3c7f7322ea17fedcd3819d743 (patch)
treedcc71264953aaf07b62aae065c4aff6d10a83a16 /src/DotNetOpenAuth.BuildTasks/CopyWithTokenSubstitution.cs
parenta3538a47a43eb00461f68fb542097871f732429a (diff)
parent505a4ae9f092e8092cc7d3b142b05614fda318f2 (diff)
downloadDotNetOpenAuth-cf48d319968262e3c7f7322ea17fedcd3819d743.zip
DotNetOpenAuth-cf48d319968262e3c7f7322ea17fedcd3819d743.tar.gz
DotNetOpenAuth-cf48d319968262e3c7f7322ea17fedcd3819d743.tar.bz2
Merge branch 'v3.3'
Conflicts: samples/InfoCardRelyingParty/Site.Master samples/OpenIdProviderWebForms/Site.Master samples/OpenIdRelyingPartyClassicAsp/MembersOnly.asp samples/OpenIdRelyingPartyClassicAsp/default.asp samples/OpenIdRelyingPartyClassicAsp/login.asp samples/OpenIdRelyingPartyWebForms/Site.Master src/DotNetOpenAuth.vsmdi src/DotNetOpenAuth/Configuration/DotNetOpenAuth.xsd src/DotNetOpenAuth/OpenId/Extensions/ExtensionsInteropHelper.cs
Diffstat (limited to 'src/DotNetOpenAuth.BuildTasks/CopyWithTokenSubstitution.cs')
-rw-r--r--src/DotNetOpenAuth.BuildTasks/CopyWithTokenSubstitution.cs14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/DotNetOpenAuth.BuildTasks/CopyWithTokenSubstitution.cs b/src/DotNetOpenAuth.BuildTasks/CopyWithTokenSubstitution.cs
index 3b81978..e17d8f2 100644
--- a/src/DotNetOpenAuth.BuildTasks/CopyWithTokenSubstitution.cs
+++ b/src/DotNetOpenAuth.BuildTasks/CopyWithTokenSubstitution.cs
@@ -18,15 +18,6 @@ namespace DotNetOpenAuth.BuildTasks {
/// </summary>
public class CopyWithTokenSubstitution : Task {
/// <summary>
- /// Gets or sets a value indicating whether the task should
- /// skip the copying of files that are unchanged between the source and destination.
- /// </summary>
- /// <value>
- /// <c>true</c> to skip copying files where the destination files are newer than the source files; otherwise, <c>false</c> to copy all files.
- /// </value>
- public bool SkipUnchangedFiles { get; set; }
-
- /// <summary>
/// Gets or sets the files to copy.
/// </summary>
/// <value>The files to copy.</value>
@@ -65,8 +56,11 @@ namespace DotNetOpenAuth.BuildTasks {
for (int i = 0; i < this.SourceFiles.Length; i++) {
string sourcePath = this.SourceFiles[i].ItemSpec;
string destPath = this.DestinationFiles[i].ItemSpec;
+ bool skipUnchangedFiles = bool.Parse(this.SourceFiles[i].GetMetadata("SkipUnchangedFiles"));
- if (this.SkipUnchangedFiles && File.GetLastWriteTimeUtc(sourcePath) < File.GetLastWriteTimeUtc(destPath)) {
+ // We deliberably consider newer destination files to be up-to-date rather than
+ // requiring equality because this task modifies the destination file while copying.
+ if (skipUnchangedFiles && File.GetLastWriteTimeUtc(sourcePath) < File.GetLastWriteTimeUtc(destPath)) {
Log.LogMessage(MessageImportance.Low, "Skipping \"{0}\" -> \"{1}\" because the destination is up to date.", sourcePath, destPath);
continue;
}