Fix of issue 2740.

svn: r14998
This commit is contained in:
Peter Landgren 2010-04-02 09:11:17 +00:00
parent 95bba1aab3
commit 8ba3e7fbe5

View File

@ -59,6 +59,7 @@ import gen.lib
from gen.updatecallback import UpdateCallback from gen.updatecallback import UpdateCallback
from gen.db.exceptions import DbWriteFailure from gen.db.exceptions import DbWriteFailure
import const import const
import constfunc
from QuestionDialog import ErrorDialog from QuestionDialog import ErrorDialog
from ExportOptions import WriterOptionBox from ExportOptions import WriterOptionBox
import gen.proxy import gen.proxy
@ -1101,7 +1102,10 @@ class GrampsXmlWriter(UpdateCallback):
elif self.strip_photos == 2 and (len(path)>0 and os.path.isabs(path)): elif self.strip_photos == 2 and (len(path)>0 and os.path.isabs(path)):
drive, path = os.path.splitdrive(path) drive, path = os.path.splitdrive(path)
path = path[1:] path = path[1:]
if constfunc.win():
# Always export path with \ replaced with /. Otherwise import
# from Windows to Linux of gpkg's path to images does not work.
path = path.replace('\\','/')
self.g.write('%s<file src="%s" mime="%s"%s/>\n' self.g.write('%s<file src="%s" mime="%s"%s/>\n'
% (" "*(index+1), self.fix(path), mime_type, desc_text)) % (" "*(index+1), self.fix(path), mime_type, desc_text))
self.write_attribute_list(obj.get_attribute_list()) self.write_attribute_list(obj.get_attribute_list())