GEPS008: Moved constfunc module

svn: r19810
This commit is contained in:
Nick Hall
2012-06-09 20:56:43 +00:00
parent aabc6c05c2
commit 9595af1324
32 changed files with 70 additions and 72 deletions

View File

@@ -62,7 +62,7 @@ import gtk
from gui.plug.export import WriterOptionBox
from ExportXml import XmlWriter
import Utils
import constfunc
from gen.constfunc import win
#-------------------------------------------------------------------------
#
@@ -217,7 +217,7 @@ class PackageWriter(object):
tarinfo = tarfile.TarInfo('data.gramps')
tarinfo.size = len(g.getvalue())
tarinfo.mtime = time.time()
if not constfunc.win():
if not win():
tarinfo.uid = os.getuid()
tarinfo.gid = os.getgid()
g.seek(0)

View File

@@ -61,7 +61,7 @@ import gen.lib
from gen.updatecallback import UpdateCallback
from gen.db.exceptions import DbWriteFailure
import const
import constfunc
from gen.constfunc import win
from gui.plug.export import WriterOptionBox
import libgrampsxml
@@ -1198,7 +1198,7 @@ class GrampsXmlWriter(UpdateCallback):
elif self.strip_photos == 2 and (len(path)>0 and os.path.isabs(path)):
drive, path = os.path.splitdrive(path)
path = path[1:]
if constfunc.win():
if 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('\\','/')