Re: [pcgen] [trackered] PCG relative file path to companion
PCG relative file path to companion
Single bug report for now, I'm going to let the James take a look and
see how many different issues this encompasses.
On 5/27/2010 3:35 PM, Saxum Caribetum wrote:
> I have hit a tiresome problem with the relative file-path handling:
> I have this Shadow Dancer that I've been blathering about. She and her
> mistress live in a Folder "Chars".
> Other characters, sent to me (as DM) by the head-of-family of the
> players, I place in a sub-folder, "Chars\HoF"
> So ... I had been working on more than one PC, in the sequence:
> having been out of PCGen and back in, I reloaded the Shadow Dancer for
> the*Recent File List*, and then tried to open the Shadow from her
> Inventory, Resources, Load button.
> I got an error claiming the file had moved - close inspection of the
> (rather long) absolute path, showed that PCGen had applied the last File
> Open path to the relative path, not the path to the (recent files
> opened) Dancer.... It was looking for
> Actually it was worse than that... I'm not actually sure HOW it got so,
> but Dancer.pcg had been saved with the absolute path to the Shadow.pcg file:
> and the absolute path which was failing was:
> so 2 bugs
> 1. PCGen is mis-handling relative path filenames - which should be
> based on the path to the parent file, but are using the
> last-browsed File Open Dialog path
> 2. PCGen is not recognising absolute pathnames and using the actual
> pathname as stored.
> I have a suspicion that PCGen writes an absolute path if the path is
> anything other than .\thing (which curiously PCGen writes as "\thing"
> not ".\thing"), and that PCGen does not handle eg "..\thing" or
> A small thing, perhaps, but not handling relative filenames*well* means
> it is hard to perform simple house-keeping like moving folders or
> renaming them.
> (At work we follow a simple rule:
> * use relative paths, including .. and sub-folders if the path to
> the linked file is on the same drive as the linking file
> * don't use more than 3 ..'s (..\..\..)
> (prevents sillies such as when everything is on C:, but one file
> is in Documents And Settings, and one is in a normal random
> folder, which you could reach as ..\..\..\..\..\Documents and
> Settings\neil\My Documents\thing)
> * otherwise write the absolute pathname
> * while in memory, all filenames are stored as absolute paths, and
> are relativised when a file containing a pathname is written to disk.
> * if you save a linked file to a new destination, change the
> absolute linked name to link to it, so saving the parent saves the
> right (freshly relativised) link, no matter where you then save
> the parent.
Andrew Maitland (LegacyKing)
PCGen Board of Directors, Admin Silverback
Data Chimp, Docs Tamarin
Unique Title "Quick-Silverback Tracker Monkey"
[Non-text portions of this message have been removed]