From 72dd0064c3791ad4a6a2ba1904d8cf12322aede3 Mon Sep 17 00:00:00 2001 From: Antonio Cunei Date: Fri, 22 Dec 2017 00:24:48 +0100 Subject: [PATCH] Change modifiedTime definitions --- .../main/scala/sbt/librarymanagement/RichUpdateReport.scala | 4 ++-- .../librarymanagement/ivyint/GigahorseUrlHandler.scala | 2 +- project/Util.scala | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/main/scala/sbt/librarymanagement/RichUpdateReport.scala b/core/src/main/scala/sbt/librarymanagement/RichUpdateReport.scala index 3d7eb933c..97f672faa 100644 --- a/core/src/main/scala/sbt/librarymanagement/RichUpdateReport.scala +++ b/core/src/main/scala/sbt/librarymanagement/RichUpdateReport.scala @@ -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) diff --git a/ivy/src/main/scala/sbt/internal/librarymanagement/ivyint/GigahorseUrlHandler.scala b/ivy/src/main/scala/sbt/internal/librarymanagement/ivyint/GigahorseUrlHandler.scala index 1a25a3202..b8da74aab 100644 --- a/ivy/src/main/scala/sbt/internal/librarymanagement/ivyint/GigahorseUrlHandler.scala +++ b/ivy/src/main/scala/sbt/internal/librarymanagement/ivyint/GigahorseUrlHandler.scala @@ -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) { diff --git a/project/Util.scala b/project/Util.scala index 5c63dd1de..3b1ead60a 100644 --- a/project/Util.scala +++ b/project/Util.scala @@ -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)