Issue 23072 - Link to graphics breaks if drawing file moved
Summary: Link to graphics breaks if drawing file moved
Status: CONFIRMED
Alias: None
Product: Draw
Classification: Application
Component: code (show other issues)
Version: OOo 2.3.1
Hardware: PC Linux, all
: P3 Trivial with 2 votes (vote)
Target Milestone: AOO Later
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-02 00:35 UTC by craiglawson
Modified: 2017-05-20 11:29 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description craiglawson 2003-12-02 00:35:07 UTC
If a drawing file is referenced by a symbolic link, OO shows graphics as broken
links.

To reproduce:
1. Create a drawing file. Link in a graphic. Save file.
2. In another directory, create a symbolic link to the drawing file.
3. Open the symbolic link with OO. Observe that links are broken.

OO's default setting is to store links as relative paths. This is fine for most
uses, mostly survives moving/renaming directories, and in this way (I think) is
a better choice than absolute paths. However, there are some cases when an
absolute path is better, and the case described above is one of them. (Another
case is where the drawing file is moved to a different directory.)

I feel that it's unreasonable and inconvenient to expect the user to anticipate
how their file will be accessed in the future and to configure links as relative
or absolute accordingly. Instead, I suggest doing what Apple did when they
introduced links -- which they called "Aliases" -- to their Mac OS (happened
maybe 10 years ago).

Mac OS aliases consisted of a unique file ID (similar to an inode in *NIX OSes)
*and* a full pathname. When accessing a file through an alias, the OS first
tried to locate the file by ID. If that failed, the fall-back plan was to try
using the pathname. The former case handled directory name changes or moved
files, and the later case handled files that had been deleted and replaced.

I suggest a similar strategy for OO: store both the relative and absolute
pathnames for the graphics link, where absolute paths have all symbolic link
components resolved. If the relative pathname fails, fall-back and try the
absolute pathname. If the user has explicitly chosen absolute over relative
paths, reverse the order of resolution (perhaps store them in reversed order in
the drawing file). I suggest that this strategy would address most of the cases
of broken links I have had.

Also see Bug 17061
Comment 1 wolframgarten 2003-12-02 07:05:17 UTC
Reassigned to Bettina.
Comment 2 ace_dent 2008-05-16 02:14:23 UTC
OpenOffice.org Issue Tracker - Feedback Request.

The Issue you raised is currently 'Unconfirmed' pending review, but has not been
updated within the last 3 years. Please consider re-testing with one of the
latest versions of OOo, as the problem(s) may have already been addressed.
Either use the recent stable version: http://download.openoffice.org/index.html
or consider trying the new OOo 3 BETA (still in testing):
http://download.openoffice.org/3.0beta/
 
Please report back the outcome so this Issue may be Closed or Progressed as
necessary - otherwise it may be Resolved as Invalid in the future. You may also
wish to search for (and note) any duplicates of this Issue that may have
advanced further by checking the Issue Tracker:
http://www.openoffice.org/issues/query.cgi
 
Many thanks,
Andrew
 
Cleaning-up and Closing old Issues as part of:
~ The Grand Bug Squash, pre v3 ~
http://marketing.openoffice.org/3.0/announcementbeta.html
Comment 3 craiglawson 2008-05-18 01:38:22 UTC
Tried it again with OO 2.3.1 on Linux PC. Continues to be a problem. Changing
classification to "defect" because the broken link just looks bad. Also changing
summary because it's not just symlinks that break the image links: moving the
file breaks the links, too.

More detailed repro instructions:
1. Create a new Draw file in $HOME. Call it $HOME/test.odg
2. Locate an image in $HOME or a subdirectory. Call it $HOME/images/picture.jpg
3. Insert image into drawing file as a link with Insert > Picture > From File...
and enable "Linked".
4. Save Draw file.
5. Quit Draw.
6. Open terminal.
7. cd /tmp
8. ln -s $HOME/test.odg
9. Open /tmp/test.odg
   Result: observe broken linked image.

Alternative repro instructions (moves file instead of symlink):
8. mv $HOME/test.odg .
9. Open /tmp/test.odg
   Result: observe broken linked image.
Comment 4 wolframgarten 2008-06-16 13:59:04 UTC
Reproducible. Reassigned.
Comment 5 Marcus 2017-05-20 11:29:37 UTC
Reset assigne to the default "issues@openoffice.apache.org".