Skip to content

Commit

Permalink
Fixed all instances of File.GetLastAccessTimeUtc
Browse files Browse the repository at this point in the history
I suspect that none of these intentional.
  • Loading branch information
jonathanpeppers committed Jul 16, 2018
1 parent a6890a1 commit cb6816a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public override bool Execute ()
var ext = Path.GetExtension (filename);
var destfilename = DestinationFiles [i].ItemSpec;
var srcmodifiedDate = File.GetLastWriteTimeUtc (filename);
var dstmodifiedDate = File.Exists (destfilename) ? File.GetLastAccessTimeUtc (destfilename) : DateTime.MinValue;
var dstmodifiedDate = File.Exists (destfilename) ? File.GetLastWriteTimeUtc (destfilename) : DateTime.MinValue;
var isXml = ext == ".xml" || ext == ".axml";

Directory.CreateDirectory (Path.GetDirectoryName (destfilename));
Expand Down Expand Up @@ -85,7 +85,7 @@ public override bool Execute ()
string filename = p.Key;
var destfilename = p.Value;
var srcmodifiedDate = File.GetLastWriteTimeUtc (filename);
var dstmodifiedDate = File.Exists (destfilename) ? File.GetLastAccessTimeUtc (destfilename) : DateTime.MinValue;
var dstmodifiedDate = File.Exists (destfilename) ? File.GetLastWriteTimeUtc (destfilename) : DateTime.MinValue;
var tmpdest = Path.GetTempFileName ();
var res = Path.Combine (Path.GetDirectoryName (filename), "..");
MonoAndroidHelper.CopyIfChanged (filename, tmpdest);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -883,14 +883,14 @@ public void BuildBasicApplicationCheckMdbAndPortablePdb ()
Assert.IsTrue (
b.Output.IsTargetSkipped ("_CopyMdbFiles"),
"the _CopyMdbFiles target should be skipped");
var lastTime = File.GetLastAccessTimeUtc (pdbToMdbPath);
var lastTime = File.GetLastWriteTimeUtc (pdbToMdbPath);
pdb.Timestamp = DateTime.UtcNow;
Assert.IsTrue (b.Build (proj, doNotCleanupOnUpdate: true), "third build failed");
Assert.IsFalse (
b.Output.IsTargetSkipped ("_CopyMdbFiles"),
"the _CopyMdbFiles target should not be skipped");
Assert.Less (lastTime,
File.GetLastAccessTimeUtc (pdbToMdbPath),
File.GetLastWriteTimeUtc (pdbToMdbPath),
"{0} should have been updated", pdbToMdbPath);
}
}
Expand Down Expand Up @@ -2253,14 +2253,14 @@ public void BuildBasicApplicationCheckPdb ()
b.Output.IsTargetSkipped ("_CopyMdbFiles"),
"the _CopyMdbFiles target should be skipped");
b.BuildLogFile = "build2.log";
var lastTime = File.GetLastAccessTimeUtc (pdbToMdbPath);
var lastTime = File.GetLastWriteTimeUtc (pdbToMdbPath);
pdb.Timestamp = DateTime.UtcNow;
Assert.IsTrue (b.Build (proj, doNotCleanupOnUpdate: true), "third build failed");
Assert.IsFalse (
b.Output.IsTargetSkipped ("_CopyMdbFiles"),
"the _CopyMdbFiles target should not be skipped");
Assert.Less (lastTime,
File.GetLastAccessTimeUtc (pdbToMdbPath),
File.GetLastWriteTimeUtc (pdbToMdbPath),
"{0} should have been updated", pdbToMdbPath);
}
}
Expand Down

0 comments on commit cb6816a

Please sign in to comment.