Bug 84113 - Saving a file or exporting pdf changes all timestamps in folder
Summary: Saving a file or exporting pdf changes all timestamps in folder
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.2.5.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-20 02:08 UTC by al.free.2011
Modified: 2015-11-30 09:16 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Tar of directory with test case text files (28.50 KB, application/x-tar)
2014-10-15 22:22 UTC, al.free.2011
Details

Note You need to log in before you can comment on or make changes to this bug.
Description al.free.2011 2014-09-20 02:08:12 UTC
Recently I upgraded HD on Macbook 10.6.8 os x.  Used time machine to update new HD.

Problem:
If using LibreOffice, cal or writer, to open existing file and then saving the file for the first time in the folder, or exporting pdf, all files in that folder, the date stamps are change to the same time stamp.  This only happens for the first save operation.  After that only the file being saved has time stamp updated. 

Using Time Machine, I restored a test folder so original timestamps were back intact.  Did an export pdf of document to another temporary folder.  The dates were changed in the original home folder and the temporary folder.

Future saves or pdf export of documents in the folder, all timestamps for other files are preserved.  This only happens the first time.
Comment 1 Robinson Tryon (qubit) 2014-09-28 23:00:24 UTC
TESTING with LO 4.3.2.2 + Ubuntu 14.04

(In reply to comment #0)
> If using LibreOffice, cal or writer, to open existing file and then saving
> the file for the first time in the folder, or exporting pdf, all files in
> that folder, the date stamps are change to the same time stamp.  This only
> happens for the first save operation.  After that only the file being saved
> has time stamp updated.

- Opened existing odt file (created today)
- Saved it to a different directory w/a datestamp of Aug 16th (over a month ago), and that contained a file w/datestamp of Aug 15th.

RESULT:
- The datestamp on the directory changed to today
- The datestamp on the contained file did not change

NO REPRO -- might be fixed in 4.3 or only exist on the Mac.
Comment 2 Alex Thurgood 2014-10-14 14:54:55 UTC
Can not reproduce in 4322 on OSX 10.9.5

Opened an existing presentation in Downloads
Saved as pdf to separate directory containing files with date from october 2013.
New pdf file saved with current timestamp, all other files remained untouched, directory access timestamp updated.

Setting as worksforme.
Comment 3 al.free.2011 2014-10-14 17:02:34 UTC
I see the notice this bug was closed.  Without any further data from me, I certainly understand.  Also somehow it appears related to my upgrading HD on my Mac, further complicating the issue.

This did prompt me to do a little more testing which maybe of interest.

I created a test directory and copied files into this directory.

Test 1:
The file copy preserved the original times stamps.  I open a file with text edit and saved as new file.  I also saves as .pdf file.  Only the file being updated changed time stamps to the present.

I proceeded to test with LibreOffice.  All the time stamps were changed to the same thing the first time. I did this several times by deleting the files, re-copy to test. 

Test 2:
I edited the file and Saved only.  Only the file in question changed it's time stamp.

Now I am curious.  The following narrowed it down to when the issue occurs:

Test 3: 
With file still open, I decided to use Save As to create a new file.  All time stamps changed when the Save As dialog came up.  I canceled the Save As dialog.  The file stamps were already changed.

Now, new Save As commands do not change other file time stamps after this first time.

If someone is interested in some further testing to gain information please contact me.

Thanks.
Comment 4 Alex Thurgood 2014-10-14 17:31:58 UTC
(In reply to al.free.2011 from comment #3)


> Test 3: 
> With file still open, I decided to use Save As to create a new file.  All
> time stamps changed when the Save As dialog came up.  I canceled the Save As
> dialog.  The file stamps were already changed.
> 
> Now, new Save As commands do not change other file time stamps after this
> first time.
> 
> If someone is interested in some further testing to gain information please
> contact me.

Hi, thanks for the further info, I will test the save as function to see if I can reproduce, and will report back here, you might be on to something
Comment 5 al.free.2011 2014-10-15 22:22:31 UTC
Created attachment 107903 [details]
Tar of directory with test case text files

This zip is of a dir, with a few text files, no extensions. 
What I did.
1.     Using cp -rp command I copied the directory to a test dir.
2.    Opened a file with LibreOffice and it opened with writer:
3.    Made a change and saved to prove it did not change all time stamps.
4.    Clicked the PDF icon.  When the file dialog came up all time stamps were changed.
I repeated the above and then tar'ed the directory.
1.    I copied it into a directory.  Did the steps above with same results.
2.    Copy it to another dir, repeated results. 

I repeated all the above, but used TextEdit, did A Save As, this only changed the file being edited.  Repeated with GVIM and it worked as expected.
1.    Opened a file with LibreOffice which was created with a Save As by TextEdit.  When the file dialog came up all time stamps were changed.
Comment 6 Alex Thurgood 2014-10-17 14:07:45 UTC
Looks like the files inside your zip got mangled, all I see inside are entries like 

HS_RAW_37_0_10_32

without any file extension or recognisable application association
Comment 7 al.free.2011 2014-10-17 15:42:12 UTC
Alex,
These are simple Text files.  There is no extension.  They were written by a perl script.   They contain lines related to gathering data related to motorcylce racing at the time of creation.  At the time I was doing this, I just Wrote, Read, etc using perl.  I did not pay attention to extensions.  The reason I am using this directory it is one that I had not already opened a file with LibreOffice and all the Time Stamps were still preserved.  I found out in trial and error that by tar'ing the dir and copying it somewhere else I could run test, see the result, delete the test directory and tar xvf TimeStamp1.tar file and try another option.

The files all look similar to this:

START_TIMES LIST
{
START = 23:1:49
}

HS_TIMES LIST
{
37    = 23:12:21
87    = 23:12:31
17    = 23:12:42
55    = 23:12:45
42    = 23:12:59
etc.

I downloaded the file into some folder.

tar xvf StampTest1.tar

So I used the finder window and went into the StampTest directory/Folder which was created by tar.

total 80
-rwxr-x---@ 1 Owner  staff    498 Mar 17  2007 HS_RAW_l98_0_07_53*
-rwxr-x---@ 1 Owner  staff    839 Mar 17  2007 HS_RAW_m99_0_06_10*
-rwxr-x---@ 1 Owner  staff    786 Mar 17  2007 HS_RAW_x9_0_07_09*
-rwxr-x---@ 1 Owner  staff   1379 Mar 17  2007 HS_RAW_R1_0_05_42*
-rwxr-x---@ 1 Owner  staff   6782 Mar 18  2007 HS_RAW_k70_0_00_43*
-rwxr-x---@ 1 Owner  staff  13049 Mar 18  2007 HS_RAW_37_0_10_32*
25   StampTest1: ls
I selected HS_RAW_l98_0_07_53 and open with LibreOffice. 
I clicked on Save As and all the time stamps for all files in that folder changed:
26   StampTest1: ls -ltr
total 128
-rwxr-x---@ 1 Owner  staff  13049 Oct 17 10:31 HS_RAW_37_0_10_32*
-rwxr-x---@ 1 Owner  staff   6782 Oct 17 10:31 HS_RAW_k70_0_00_43*
-rwxr-x---@ 1 Owner  staff    786 Oct 17 10:31 HS_RAW_x9_0_07_09*
-rwxr-x---@ 1 Owner  staff    839 Oct 17 10:31 HS_RAW_m99_0_06_10*
-rwxr-x---@ 1 Owner  staff    498 Oct 17 10:31 HS_RAW_l98_0_07_53*
-rwxr-x---@ 1 Owner  staff   1379 Oct 17 10:31 HS_RAW_R1_0_05_42* 

If there is still a problem that the files seem mangled for you, I can place the file in DropBox and sent you a link to your personal email if needed.

Let me know what I can do to help.

thanks
Comment 8 Alex Thurgood 2014-10-18 08:25:54 UTC
Hi Alvin,

So, I tested your files on OSX Yosemite 10.10 with LO 4332, the file timestamps of the other unopened files in the directory remained unchanged, even when using "Save as
Comment 9 al.free.2011 2014-10-24 01:28:53 UTC
I just received my new MacBookPro.  I tried this out and did not have a problem.  The issue appears to be unique to my MacBook and upgrading the HD.  

Thanks Alex.
Comment 10 jtallerx 2015-11-29 05:36:16 UTC
I just want to say the bug is well alive in Ubuntu 14.0, with LibreOffice 4.2.8.2. This is critical for me. The second most important criteria I use to find my files is the date. The LibreOffice is destroying my date.
thank you for listening.
I will try to file separate bug for Ubuntu, but my point is this bug is OS independent as you can see.
I consider this high priority.

More details.
I have Ubuntu 14.0.4. LibreOffice 4.2.8.2.
I have directory dir1.
Inside dir1 I have f1.doc and f2.doc. (also with .odt and docx).
I open file f1.doc with Libre and do no change to the file and close it.
Undesirably the timestamp of dir1 was chaged to now time.
In other words destroying the original time stamp which indicates if something changed. But nothing changed here.
Comment 11 jtallerx 2015-11-29 06:52:12 UTC
Just installed LO 5.0.3. hoping that the bug was fixed.
Bug is still there.

I just want to say the bug is well alive in Ubuntu 14.0, with LibreOffice 5.0.3.. This is critical for me. The second most important criteria I use to find my files is the date. The LibreOffice is destroying my date.
thank you for listening.
I will try to file separate bug for Ubuntu, but my point is this bug is OS independent as you can see.
I consider this high priority.

More details.
I have Ubuntu 14.0.4. LibreOffice 5.0.3..
I have directory dir1.
Inside dir1 I have f1.doc and f2.doc. (also with .odt and docx).
I open file f1.doc with Libre and do no change to the file and close it.
Undesirably the timestamp of dir1 was chaged to now time.
In other words destroying the original time stamp which indicates if something changed. But nothing changed here.
Comment 12 jtallerx 2015-11-29 07:25:05 UTC
Please see bug 60290 as it seems to solve this or similar problem.