I think it makes sense... i can't really think of a case where it falls down
with != .
Andrea, what do you think?
On Wed, Jun 8, 2011 at 12:36 AM, <christian.muel...@nvoe.at> wrote:
>
> I think that org.geoserver.platform.FileWatcher will not work for
> restored files.
> Method isModified compares with file.lastModified > lastModified
>
>
> /**
> * Determines if the underlying file has been modified since the
> last check.
> */
> public boolean isModified() {
> long now = System.currentTimeMillis();
> if((now - lastCheck) > 1000) {
> lastCheck = now;
> stale = file.exists() && (file.lastModified() > lastModified);
> }
> return stale;
> }
>
> I tried with a file file1.txt, created a zip archive, waited a minute,
> modified file1.txt to get a newer timestamp and restored with an
> unzip. The last modified timestamp was the original one.
>
> I think it hast to be
>
> stale = file.exists() && (file.lastModified() != lastModified);
>
> instead of
>
> stale = file.exists() && (file.lastModified() > lastModified);
>
> Opinions ?
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>
>
>
> ------------------------------------------------------------------------------
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.
> http://p.sf.net/sfu/ephox-dev2dev
> _______________________________________________
> Geoserver-devel mailing list
> Geoserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel