Unable to import old libraries due to lack of 'filename' field in version 1.2.1
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Referencer |
Confirmed
|
Medium
|
Unassigned |
Bug Description
I am upgrading from Referencer 1.1.6 to version 1.2.1. My old libraries from 1.1.6 have two fields for the local document location: "filename" and "relative_
I suppose this could be fixed by re-introducing the "filename" field with the full path to the documents. Another fix would be to write a script to copy the correct relative path info to the "relative_filename" field in the libraries generated by previous versions of Referencer, so that they can be successfully opened in Referencer 1.2.1.
Ok I found the source of the problem, and I don't think a patch is strictly needed. In version 1.2.1 I see in Document.C (line 464) that Referencer now prefers to use only relative filenames in the library XML file, and only reads for a full filename if no relative filename is found. This seems like good practice in general. My problem arose because of what I assume was a bug in version 1.1.6 that stripped the path locations out of the relative_filename fields, so it only contained the name of the file. If the relative_filename field were just empty, Referencer 1.2.1 would look for the full filename and would still find the document. But since relative_filename contained just the name of the file, Referencer doesn't find the document and gives an error.
I solved my problem simply enough: deleted all the <relative_filename> lines from my old library file, opened it in Referencer 1.2.1, then re-saved it, which re-populated the relative_filename fields with all the correct file locations.
There probably won't be many users who have this same problem, unless they are also coming from version 1.1.6 with an old library file. But if it's worth the trouble, it might be best to have Referencer still write the full filename info in the library XML file, and read from it not only if relative_filename is missing, but also if it results in a file not found, for us old users.