GNOME Bugzilla – Bug 709780
Copying of files via \image tag can get confused by symlinks at the destination
Last modified: 2013-12-24 18:59:25 UTC
Created attachment 256863 [details] dox.tar.gz The \image tag results in a copy from the input directory to the documentation directory. However, it seems that the copy does not check for an existing file in the documentation directory - if a symlink exists there, it looks like the copy follows the symlink (rather than replacing it) and can get confused. For example, consider the following input (also in the attachment): doxygen config, 'dox', the output of 'doxygen -s -g dox' with the following changes: INPUT = inputs FILE_PATTERNS = *.c IMAGE_PATH = inputs GENERATE_LATEX = NO inputs/test.c containing /** \file test.c \image html foo.png */ inputs/foo.png is some image. Now let's put a symlink (back to the original file) in the HTML output directory: rm -rf html; mkdir html; ln -sf ../inputs/foo.png html Then run doxygen: 'doxygen dox' and finally look at the resulting images with 'ls -l */foo.png': lrwxrwxrwx. 1 ben users 17 Oct 9 17:10 html/foo.png -> ../inputs/foo.png -rw-r--r--. 1 ben users 0 Oct 9 17:10 inputs/foo.png Note that the original file, inputs/foo.png, is now 0 bytes. My guess is this is because doxygen followed the symlink and so tried to overwrite the file with itself. Seems like a simple fix would be to simply check if a file exists at the destination before doing the copy, and if it does, remove it.
Confirmed. Should be fixed in the next GIT update.
This bug was previously marked ASSIGNED, which means it should be fixed in doxygen version 1.8.6. Please verify if this is indeed the case. Reopen the bug if you think it is not fixed and please include any additional information that you think can be relevant (preferrably in the form of a self-contained example).