Home » U++ Library support » U++ Core » [solved!] XML serialization and relative paths
[solved!] XML serialization and relative paths [message #19028] |
Thu, 06 November 2008 13:48 |
Mindtraveller
Messages: 917 Registered: August 2007 Location: Russia, Moscow rgn.
|
Experienced Contributor |
|
|
Recently I used StoreAsXMLFile/LoadFromXMLFile on POSIX system with latest build. And discovered no xml file in my executable`s directory. Finally discovered it is situated in ~/.upp/<exe_name>/<exe_name>.xml
This is really good default behaviour. But when I define filename with relative path, it is still situated in ~/.upp/<exe_name> directory! This is the surprise I want to talk about.
The problem is that I have a number of the same executables (in a number of directories) which should hold different configurations for each of them. But it can`t be done with standard functions as all the XML config files are overwritten within one directory.
I dag into U++ and discovered that IsFullPath() is called, which is false even for files like "./setup.conf". Yes, it is not a full path, but it is exactly the path I want. And function must work with this file with no surprises.
My proposal is to rename these functions to StoreAsXMLFileDefault/LoadFromXMLFileDefault and add StoreAsXMLFile/LoadFromXMLFile functions with no surprises in their behaviour.
[Updated on: Thu, 06 November 2008 22:24] Report message to a moderator
|
|
|
|
|
Goto Forum:
Current Time: Wed Jun 05 07:36:19 CEST 2024
Total time taken to generate the page: 0.01673 seconds
|