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

Reply via email to