mirror of https://github.com/sbt/sbt.git
Change modifiedTime definitions
This commit is contained in:
parent
42f23e62aa
commit
72dd0064c3
|
|
@ -18,9 +18,9 @@ final class RichUpdateReport(report: UpdateReport) {
|
|||
(f,
|
||||
// TODO: The list of files may also contain some odd files that do not actually exist like:
|
||||
// "./target/ivyhome/resolution-cache/com.example/foo/0.4.0/resolved.xml.xml".
|
||||
// IO.lastModified() will just return zero, but the list of files should not contain such
|
||||
// IO.getModifiedTimeOrZero() will just return zero, but the list of files should not contain such
|
||||
// files to begin with, in principle.
|
||||
IO.lastModified(f)
|
||||
IO.getModifiedTimeOrZero(f))
|
||||
)
|
||||
.toMap
|
||||
UpdateReport(report.cachedDescriptor, report.configurations, report.stats, stamps)
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ class GigahorseUrlHandler extends AbstractURLHandler {
|
|||
|
||||
val lastModified = lastModifiedTimestamp(response)
|
||||
if (lastModified > 0) {
|
||||
IO.setLastModified(dest, lastModified)
|
||||
IO.setModifiedTimeOrFalse(dest, lastModified)
|
||||
}
|
||||
|
||||
if (l != null) {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ object Util {
|
|||
val timestamp = formatter.format(new Date)
|
||||
val content = versionLine(version) + "\ntimestamp=" + timestamp
|
||||
val f = dir / "xsbt.version.properties"
|
||||
// TODO: replace lastModified() with sbt.io.IO.lastModified(), once the build
|
||||
// TODO: replace lastModified() with sbt.io.IO.getModifiedTimeOrZero(), once the build
|
||||
// has been upgraded to a version of sbt that includes that call.
|
||||
if (!f.exists || f.lastModified < lastCompilationTime(analysis) || !containsVersion(f, version)) {
|
||||
s.log.info("Writing version information to " + f + " :\n" + content)
|
||||
|
|
|
|||
Loading…
Reference in New Issue