Changing @auto paths overwrites files without warning

Bug #889175 reported by tbnorth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
leo-editor
Fix Released
High
Edward K. Ream

Bug Description

I loaded an outline with @auto nodes pointing to an out of date path. So body texts were empty. I updated the paths in the node headlines and saved the file, expecting to be prompted for overwriting the existing files (now the paths were correct again), but they were over-written with the blank content without warning. Damn. Steps to reproduce in a simpler way below, but don't write the below of as contrived, because the above is the real problem.

Create @auto /home/tbrown/text.txt

enter text, save file

Edit headline to @auto /home/tbrown/Desktop/text.txt

enter text, save file

Edit headline back to /home/tbrown/text.txt

Save file - /home/tbrown/text.txt is overwritten without warning

Revision history for this message
tbnorth (terry-n-brown) wrote :

I now see this happens also if the path change is in a @path node ancestor of the @auto node.

Revision history for this message
Matt Wilkie (maphew) wrote :

also see http://groups.google.com/group/leo-editor/browse_frm/thread/1e5d18b08269fb2a, which is about how to safely move or update a leo document using @file nodes (meaning: tread with care, it's easy to lose your date).

Changed in leo-editor:
importance: Undecided → High
assignee: nobody → Edward K. Ream (edreamleo)
Revision history for this message
HansBKK (hansbkk) wrote :
Revision history for this message
Edward K. Ream (edreamleo) wrote :

Fixed (mostly) at rev 4921. I'll add some additional checks next.

Revision history for this message
Edward K. Ream (edreamleo) wrote :

Last fix at rev 4925.

Changed in leo-editor:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.