Please login or register.

Login with username, password and session length

Author Topic: Downloading timer file changes 'Modified' date  (Read 5362 times)

Burdy

  • Guest
Downloading timer file changes 'Modified' date
« on: December 14, 2004, 12:12:40 PM »

I noticed this when I set the 'read only'
attribute on one of my timer files.
Downloading it to the CM15A produced a popup
saying 'error trying to save file' although
the download did proceed.   Then I noticed
that every time I download a file to the
interface (assuming its not marked read
only), the timer file's 'modified' date is
set to the current date/time.  (3.173)

This really makes timer file version control
difficult.
Logged

donald mcmow

  • Hero Member
  • *****
  • Helpful Post Rating: 0
  • Posts: 306
Re: Downloading timer file changes 'Modified' date
« Reply #1 on: December 14, 2004, 09:08:42 PM »

I believe that when you download the file
into the CM15A, it is also saved to the
data file on the computer - since the file
is read-only it can't be saved - hence the
error. Why do you want to mark your data
files as READ-ONLY? You create more
problems for your self - you don't know
what data file is loaded into the CM15A -
is it version 1 or version 2 - the
interface won't tell you that. Secondly, if
AHP saves the data file when it is
downloaded into the CM15A - that is the
version that is downloaded into the
interface. And YES, the modified date is
the date the the file was last saved onto
the hard-drive, a file marked as READ-ONLY
will not have it's date changed since you
CAN'T modify it - you can only READ not
WRITE to the file. THIS IS OPERATING SYSTEM
DEFINED - X10/AHP can do nothing about this
issue unless you want to give the program
access to the read-only flag which defeats
the purpose of it.
Logged

anonymous

  • Guest
Re: Downloading timer file changes 'Modified' date
« Reply #2 on: December 14, 2004, 11:15:53 PM »

I'm not asking for a change in the way the
operating system works, or in the way that
file attributes work.

When I CHANGE a file and SAVE it, or SAVE it
even without changing it, I would EXPECT the
modified attribute to change.  AHP even
warns you about exiting without saving a
changed file.  That's fine.

I DON'T expect an unchanged source
file's 'modified' attribute to change just
by using AHP to open it and download it to
the CM15A.

As my post said, AHP (at least the current
version) is able to open and download a read-
only timer file to the interface, despite
the popup.  This is easy to verify by
actually trying it (as I did before I
posted).

To answer the question you posed, my reason
to mark a data file read only is to prevent
inadvertent changes.  It takes one variable
out of the loop of the debugging process
that doesn't need to be introduced.

Ever use a compiler that changed the dates
of your source files? Do you think that
creates fewer problems?

There may very well be a valid reason why
AHP tries to re-write an unchanged file to
disk when loading it (even though it doesn't
have to).   I'm not trying to second guess
the design; just trying to point out a
consequence that may be unexpected.



Logged

Burdy

  • Guest
Re: Downloading timer file changes 'Modified' date
« Reply #3 on: December 14, 2004, 11:17:20 PM »

Oops.. that 'anonymous' was me (obviously).
Logged

X10 Pro

  • Hero Member
  • *****
  • Helpful Post Rating: 23
  • Posts: 1416
Re: Downloading timer file changes 'Modified' date
« Reply #4 on: December 15, 2004, 12:34:25 PM »

AHP saves the file when you download. Based
on what you're saying, we save the file data
even if there's no change. I'll see if we can
save before a download only if there's a change.
Logged

andyd

  • Sr. Member
  • ****
  • Helpful Post Rating: 1
  • Posts: 82
Re: Downloading timer file changes 'Modified' date
« Reply #5 on: December 15, 2004, 02:59:11 PM »

Why don't you just let the user decide to
save the file.  I sometimes want to change
the file and not download it and I sometime
want to download a file and not save it.

There are enough warnings to prevent
accidental loss of updated files.  If you
think autosave on download is required by
some then please make it a user selectable
option/preference.
Logged

X10 Pro

  • Hero Member
  • *****
  • Helpful Post Rating: 23
  • Posts: 1416
Re: Downloading timer file changes 'Modified' date
« Reply #6 on: December 15, 2004, 03:05:58 PM »

AndyD: That's sensible. I'll see what we need
to do to make it work that way.
Logged
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.