From 693ce550d7cdb3fe66b72a6acd61cb8a7b94f4fb Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Mon, 18 Aug 2003 21:50:03 +0000 Subject: [PATCH] We need to update our last modified time after downloading the resource. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2780 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/java/com/threerings/resource/HTTPDownloader.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/resource/HTTPDownloader.java b/src/java/com/threerings/resource/HTTPDownloader.java index f04c7ff8a..0c2310f0a 100644 --- a/src/java/com/threerings/resource/HTTPDownloader.java +++ b/src/java/com/threerings/resource/HTTPDownloader.java @@ -1,5 +1,5 @@ // -// $Id: HTTPDownloader.java,v 1.1 2003/08/08 17:45:00 mdb Exp $ +// $Id: HTTPDownloader.java,v 1.2 2003/08/18 21:50:03 mdb Exp $ package com.threerings.resource; @@ -66,5 +66,14 @@ public class HTTPDownloader extends Downloader Log.info("Downloading updated jar [url=" + _desc.sourceURL + "]."); downloadContent(dmgr, obs, pinfo, buffer, ucon, _desc.destFile); + + // if we have a last modified time, we want to adjust our cache + // file accordingly + if (_desc.lastModified != 0) { + if (!_desc.destFile.setLastModified(_desc.lastModified)) { + Log.warning("Failed to set last-modified date " + + "[file=" + _desc.destFile + "]."); + } + } } }