3665: Crash with Webcal report when linking with WebReport

svn: r14649
This commit is contained in:
Doug Blank 2010-03-06 13:31:09 +00:00
parent 2f52deae58
commit 6a7594b95f

View File

@ -55,6 +55,7 @@ log = logging.getLogger(".WebPage")
#------------------------------------------------------------------------ #------------------------------------------------------------------------
from gen.lib import date, Date, Name, Person, NameType, EventType from gen.lib import date, Date, Name, Person, NameType, EventType
import const import const
import constfunc
from ReportBase import Report, ReportUtils, MenuReportOptions, CSS_FILES from ReportBase import Report, ReportUtils, MenuReportOptions, CSS_FILES
from gen.plug.menu import BooleanOption, NumberOption, StringOption, \ from gen.plug.menu import BooleanOption, NumberOption, StringOption, \
EnumeratedListOption, FilterOption, PersonOption, \ EnumeratedListOption, FilterOption, PersonOption, \
@ -1026,7 +1027,7 @@ class WebCalReport(Report):
Imagine we run gramps on Windows (heaven forbits), we don't want to Imagine we run gramps on Windows (heaven forbits), we don't want to
see backslashes in the URL. see backslashes in the URL.
""" """
if (Utils.win): if (constfunc.win()):
fname = fname.replace('\\',"/") fname = fname.replace('\\',"/")
subdirs = self.build_subdirs(subdir, fname) subdirs = self.build_subdirs(subdir, fname)
return (prefix or '') + "/".join(subdirs + [fname]) return (prefix or '') + "/".join(subdirs + [fname])