Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [stellation-res] Windows Issues

On Tue, Aug 20, 2002 at 05:09:43AM -0400, Jonathan Gossage wrote:
> 
> There are a number of places in Stellation where file paths are stored in
> String objects and these objects are then compared with the equals() method.
> The problem is that Windows file paths are case insensitive while Unix file
> paths are case sensitive. This means that these comparisions should be done
> in a platform sensitive manner.
> 
Indeed they should!

> I need some help from the Stellation team in identifying all the areas where
> this problem exists in the codebase. So far I know of two areas, the one
> discussed above and the storage and handling of paths and path fragments
> used in the "preserves" handling. Another potential area may be the storage
> of paths in the database itself.
> 
Good point. There are no 'paths' in the database; however, there are the names
used for the members of CompoundArtifacts, and it would be nice to avoid having
to deal with case-sensitivity here, lest it overly complicate SQL code that
accesses the database.

> Once all the areas have been identified, I will develop an initial strategy
> for dealing with this set of problems and will present it for review by the
> team before proceeding to implement any changes to deal with this issue.
> 

I suggest mapping all Windows-related path information to lower case early on.
This lets us keep existing repository access code. I'm in the midst of a major
cleanup of the workspace code (it's size has dropped from just over 13,000 lines to about
10,700 lines). As part of this I have combined the current JavaChange (used for Windows)
and UnixChange (used for sane operating systems) into a single class Change, and moved
the path-manipulation code to Files. Files now has a method
  public String getCanonicalPath(String path)
that returns the 'canonical' form of a path. It's essentially java File.getCanonicalPath()
on Windows systems, and the standard Unix-style normalization on sane systems. We could have
it map Windows paths to full lower case, and that would solve (I think) most of the problems.

There is still the issue of 'preserves' matching, currently in Workspace, and you comment suggests
this code should be moved to Files as well, and I'll try to do that as time permits.

My latest code is not yet checked into the CVS tree, as I have been relying on the shadow from 
our Stellation tree to the eclipse CVS tree. However, since our repository is currently down, I'm
working in isolated mode. (I also want to wait until Jim gets back next week, when we can hopefully
update his code to use the new workspace code).

In summary, you have identified an important problem, one that we need to sort out together. What
with vacations, and my youngest daughter leaving for college next week, things here are a bit hectic,
and I suggest we put this off until my new code is merged into the main CVS branch, which should
happen in a week or so.

thanks,
dave

-- 
Dave Shields, IBM Research, shields@xxxxxxxxxxxxxx. 


Back to the top