Closed Bug 14507 Opened 25 years ago Closed 25 years ago

cache file pathnames point to wrong place

Categories

(CCK Graveyard :: CCK-Wizard, defect, P2)

x86
Windows NT
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: selmer, Assigned: vparthas)

Details

The pathnames we're shipping inside the cache file are fully qualified names
such as c:\cck\Configs\Default\animlogo\smallanim.gif.  On my machine, I
installed into c:\cck9.21 so these pathnames are all wrong.

It seems like the best solution to this problem is to make all pathnames that
live within our install directory into relative names.  The way to do this is to
detect the presence of a prefix and remove that prefix from the pathnames before
storing them and adding it back when retrieving them.  Sometimes this might be
wrong, but not often.

I don't think we can make them relative to the configuration's own directory
since we want configurations to point into each other (such as the Default.)
Therefore, the next best place to pick is the directory containing the CCK
Wizard executable.
Assignee: selmer → racham
Priority: P3 → P2
Target Milestone: M12
Status: NEW → ASSIGNED
Assignee: racham → varada
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
A refinement to the above discussion is that we could allow globals to reference
other globals.  We need to create a global like ROOT that points at the
executable directory anyway for other reasons.  If we did this, then we could
have FOOBMP=%ROOT%\Defaults\Images\foo.bmp and that would also resolve this
problem elegantly.

To code this, simply run the variable through replaceVars() if you detect a
matched pair of '%' characters in its value.

This solution would open the problems of recursive reference and such, but I'm
not too worried about that.  Other solutions are possible...
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
I have fixed this such that while the cache is being read - the %root% is
evaluated as the current working directory - the top level cache can then needs
to have only the %root% and it will work in any directory - the other cache
files are created by the user values and hence we are not dealing with that.
changes have to be made to the default cache to reflect %Root% wherever we need
a relative path - eg %Root%Configs\Defaults\Bitmaps\animlogo.bmp. instead of
c:\..\..\...
Marking this Verified Fixed
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.