zenwalk / mapaction-toolbox

Automatically exported from code.google.com/p/mapaction-toolbox
0 stars 0 forks source link

browsing to old config files causes unhandled exception #61

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.In the config tool, browsing to a folder containing an old 
operation_config.xml file causes an unhandled exception to occur
2.old file attached for testing
3.

What is the expected output? What do you see instead?
should report it as an old version of the file to be deleted before proceeding 
or open it

Please use labels and text to provide additional information.

Original issue reported on code.google.com by gd...@mapaction.org on 30 Jul 2013 at 11:02

Attachments:

GoogleCodeExporter commented 9 years ago
I've not had a chance to test this yet, just look at the example 
operation_config.xml file. I think that this is due to the way teh path is 
stored in the file - as a windows path (eg D:\mapaction) with a drive letter 
and backslashes. This is not valid XML as far as I'm aware. it should be 
converted to a file:/// url first. See this post:
http://stackoverflow.com/questions/758605/producing-a-windows-path-from-an-xml-u
ri

And the PathCreateFromUrl and UrlCreateFromPath functions.

Once I tested it I'll assign it to Chris (if that's OK).

Original comment by andrewphilipsmith on 17 Aug 2013 at 10:54

GoogleCodeExporter commented 9 years ago
This was related to the way the path is stored as a Windows path, not a URI. 
The MapAction.Utilites class has been updated to write the export path as local 
URI (eg file:///some/path/) when writing to the operation_config.xml. This is 
then re-interpreated as a local path (eg D:\MapAction\my\crash\move\folder) 
when the operation_config.xml file is read.

Original comment by andrewphilipsmith on 29 Aug 2013 at 11:51

GoogleCodeExporter commented 9 years ago
still creates an unhandled exception when the config file contains an export 
path in the wrong format i.e D:\mapaction 
Once updated, the file behaves correctly as the path is correctly stored as a 
url. 

Original comment by gd...@mapaction.org on 16 Aug 2014 at 3:52