Openoffice.org modifies unexpectedly the modification time of directories

Asked by Javier Mateo López Cuñat

When I open an OOo (or msword) document with OpenOffice.org 3.2.1 and I close it without modifying contents, the modification time of the directory is updated. Is this a bug?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu openoffice.org Edit question
Assignee:
No assignee Edit question
Solved by:
Eliah Kagan
Solved:
Last query:
Last reply:
Revision history for this message
Best Eliah Kagan (degeneracypressure) said :
#1

When OpenOffice.org opens a document (except when it opens it readonly, which would happen automatically if the file is readonly or the volume containing it is readonly), it creates a lockfile in the same directory as the document, to control access to the document. For example, putting an OpenOffice.org Writer document called testdoc.odt in a folder called ~/test and listing the full contents of the folder while the document is open in OpenOffice.org will yield output like this:

ek@Apok:~/test$ ls -al
total 28
drwxr-xr-x 2 ek ek 4096 2011-03-01 22:36 .
drwxr-x--- 111 ek ek 12288 2011-03-01 22:36 ..
-rw-r--r-- 1 ek ek 68 2011-03-01 22:36 .~lock.testdoc.odt#
-rw-r--r-- 1 ek ek 8167 2011-03-01 07:58 testdoc.odt

Since it's creating a lock file in the directory, it is modifying the contents of the directory, and thus it is correct behavior for the directory's modification time to be updated.

Revision history for this message
Javier Mateo López Cuñat (javloc2) said :
#2

OK. Thanks. I find this feature somewhat uncomfortable. Sometimes, I'm looking for the most recent file contained in a group of directories.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#3

You can still examine the file modification times of all the files in the multiple directories, at once. For example, from the command line:

ls -lR dir1 dir2 dir3 ...