Zitat von Justin Deoliveira <jdeol...@opengeo.org>: > I think it makes sense... i can't really think of a case where it falls down > with != .
I think almost every backup/restore utility would set the original last access timestamp on restore, A concrete sample. I use the tar utility to backup user.properties. Next, user.properties is modified and reloaded by geoserver. Some times later, due to problems, I restore user.properties with the tar utility --> No automatic reload by geoserver. I think that a reload has to occur if the last modified time stamp changed, a different time stamp indicates a different version of the file, independent of looking into the future or into the past. Cheers Christian > > 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. > ---------------------------------------------------------------- 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