You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2015/12/28 10:01:07 UTC

[Issue 126757] New: Warning on file save when modification time changed

https://bz.apache.org/ooo/show_bug.cgi?id=126757

          Issue ID: 126757
        Issue Type: DEFECT
           Summary: Warning on file save when modification time changed
           Product: General
           Version: 4.1.2
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P5 (lowest)
         Component: ui
          Assignee: issues@openoffice.apache.org
          Reporter: david.vogt@adfinis-sygroup.ch

When a document is opened in OpenOffice and an external event (for example
"touch mydoc.odt") happens, the next save from OpenOffice leads to the
following dialog / message: "The file has been changed since it was opened for
editing in OpenOffice. Saving your version of the document will overwrite
changes made by others. Do you want to save anyway?"

So, instead of checking the modification time, wouldn't it be a better idea to
look at a checksum of the file instead, and only warn if the file *actually*
changed?

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126757] Warning on file save when modification time changed

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126757

dyo <ol...@bger.ch> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |olivier.duffey@bger.ch

--- Comment #3 from dyo <ol...@bger.ch> ---
I suggest that this could be an option that is not active by default.
The option could be activated in the startup script of OpenOffice (soffice.sh)
with an environment variable.
Something like:
SAL_CHECKSUM_ENABLE=true; export SAL_CHECKSUM_ENABLE

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126757] Warning on file save when modification time changed

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126757

--- Comment #1 from david.vogt@adfinis-sygroup.ch ---
I have a client who would be willing to pay for implementing this change.
Therefore, what would be the requirements from you AOO guys to accept such a
patch?

Also, is there already some checksumming library / functionality in the code
base that could be used for this?

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126757] Warning on file save when modification time changed

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126757

orcmid <or...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |orcmid@apache.org

--- Comment #2 from orcmid <or...@apache.org> ---
(In reply to david.vogt from comment #0)
> So, instead of checking the modification time, wouldn't it be a better idea
> to look at a checksum of the file instead, and only warn if the file
> *actually* changed?

That seems to be a rather contrived approach that can still fail in a race
situation.  There is nothing in the code base that provides digests of complete
files, although there are certainly utilities that could be borrowed from for
that purpose.  (Both encryption and digital signatures are done "by parts" for
components carried in Zip files and not on total files.  The digest-computation
libraries used could probably be reused over complete files.)

It would probably be better if actual file-system-level locking against
alteration were employed when a file was opened for alteration or replacement. 
That might be non-trivial because of the way OpenOffice handles file locking,
renaming of created files, etc., but it would certainly be better under typical
conditions.  

One could also argue that changing metadata (i.e., what touching the file does
at the directory-entry level) qualifies as a change, even though a peculiar
one.  

Is there a particular platform on which this situation is such an annoyance for
the client and actually occurs?

For accepting patches to accomplish this, there are standard conditions for
contributions of code to Apache Projects.  For something so impactful, it would
be good to have advance agreement at the design level and review of the
ramifications.  It might be that the project would find the introduction of
digest computations to be unacceptable.

-- 
You are receiving this mail because:
You are the assignee for the issue.