Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] Proposed change to URLUtils

In plug-in 'net.refractions.udig.catalog' package 'net.refractions.udig.catalog' file URLUtils.java 

in function urlEquals -which starts at about line 47. 

Currently has:

66 String string1 = URLUtils.urlToString(url1, stripRef);
67 String string2 = URLUtils.urlToString(url2, stripRef);
   
I propose changing it to:

66 String string1 = URLUtils.urlToString(url1, stripRef).replace("%20", " ").toLowerCase();
67 String string2 = URLUtils.urlToString(url2, stripRef).replace("%20", " ").toLowerCase();

This fixes a lot of the problems I run into with spaces and fixes where a shapefile gets added to the catalog with capital drive letter and then something trys to load it using a lowercase drive letter. The only downside I can see is if you are on a *nix box and someone really wants to have different shapefiles with the same name and only capitalization differences, something that seems silly to do and impossible on at least windows.  

Thank you for your time,
Justin Lynch


Back to the top