From: Alvaro H. <alv...@al...> - 2007-11-07 19:53:49
|
Benny Malengier wrote: > We have a serious design problem in 3.0 > > It concerns relative media paths no longer working in 3.0. See also bug > http://bugs.gramps-project.org/view.php?id=1208 > > Reason: > In 2.2.x user has a grdb/xml file somewhere on his disk in a dir by his > choosing. Relative path is related to that position. In 3.0 all databases > are kept in ~/.gramps/grampsdb/<some number>. > So in 3.0 a relative path would be ../../../genea_dir/images, not really > something you want to show to Aunt Martha. Moreover conversion from > 2.2.xdatabase to > 3.0 fails to find the paths on upgrade. > > Note, due to some bug, the method to calculate relative path doesn't give > correct info anymore in 3.0, so adding relative paths media is impossible in > trunk at the moment. > > How do we solve this? Many people use relative paths so as to switch between > computers/OS. How about having a separate variable, "base dir for media", a database-wide setting, which is prepended to objects at the time of opening. So for the example above you could have the media itself in the database as "images/foo.jpg" and the base_dir as "../../../genea_dir". The conversion process could "somehow" (/me handwaves) convert the paths as needed. To Aunt Martha you could just allow her to pick an absolute path, or even better, a path relative from $HOME (so internally save it as ~/media/martha/images, and at runtime expand ~ to $HOME). -- Alvaro Herrera http://www.PlanetPostgreSQL.org/ "If it wasn't for my companion, I believe I'd be having the time of my life" (John Dunbar) |