www.virtualacorn.co.uk/forum

For support and advice on VirtualAcorn products
Forums now closed. This is an HTML only record of the content.
HTML version of Forum generated Thursday 24th May 2018

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Issue with HostFS implementation of datestamp SWIs
PostPosted: Thu May 22, 2008 2:22 pm 
Offline

Joined: Thu Nov 28, 2002 7:08 pm
Posts: 69
Location: Cambridge
I've been doing a lot of "syncing" with DirSync recently and noticed that it was about to copy from an older "source" file to a newer "target" file. Investigation showed that the displayed datestamps were the Windows "modified" stamps (which is what you would expect). However DirSync clearly must be using a different SWI to get the comparison date stamps, a SWI that is reporting the Windows "accessed" stamp. In the case I investigated the "accessed" stamp was the only one that could have resulted in the "source" file appearing to be newer than the "target" file (both creation and modified stamps of the source were older).
Not having access to DirSync's source code I can't easliy find out which SWI is involved but I've reported this to the DirSync author.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 23, 2008 11:41 am 
Offline

Joined: Thu Nov 28, 2002 7:08 pm
Posts: 69
Location: Cambridge
OK, this appears not to be an issue with HostFS after all. The datestamps used by RISC OS appear to be the "modified date" which is what you'd expect.
What is happening is that DirSync has options set to "Try to ignore differences in timezones" and "Ignore differences of a few seconds" when comparing date stamps. These are necessary because there can be a second or two discrepancy between date stamps depending of how files were written and or transferred from one machine to another (in my case across Windows, Linux and RISC OS platforms). The net effect of these options is to regard compared files as being the same version if the *time* stamp is within a few seconds and the date/time is within 24 hours (ie possible timezone difference). Unfortunately, in my case, I have files produced on the hour by batch jobs so they can look like they are meant to be the same file, but because the size is different DirSync takes the later *time" stamp as the later file, even if the "date* is earlier (which turns out to be the wrong decision but for an understandable reason).
What led me to think HostFS was at fault was a red herring (the "accessed" time stamp looked like it was the reason for the incorrect datestamp comparison, but if fact it has nothing to do with it).
Hopefully this explanation might be useful if anyone else who uses DirSync on HostFS and wonders why files with similar *time* stamps appear to have false comparisons.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 23, 2008 4:22 pm 
Offline
Site Admin

Joined: Wed Oct 23, 2002 12:16 pm
Posts: 958
Thanks for that reply you've saved me asking the questions that would have (hopefully) ended up with a similar conclusion.


Top
 Profile  
 
 
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

   
Forums originally Powered by phpBB © 2007 phpBB Group. Contents © 3QD Developments Ltd 2018 version no. 1.07