Consequences of 3656:ee3c7f3d964f. Deal with the fact that some subdocs may not have a filename field at all

This commit is contained in:
Jean-Francois Dockes 2014-07-07 18:58:00 +02:00
parent 9a40f9c2e9
commit c345f21067
2 changed files with 7 additions and 0 deletions

View file

@ -381,6 +381,11 @@ endopts:
string titleorfn = doc.meta[Rcl::Doc::keytt];
if (titleorfn.empty())
titleorfn = doc.meta[Rcl::Doc::keyfn];
if (titleorfn.empty()) {
string url;
printableUrl(rclconfig->getDefCharset(), doc.url, url);
titleorfn = path_getsimple(url);
}
char cpc[20];
sprintf(cpc, "%d", doc.pc);

View file

@ -7,6 +7,8 @@ else:
ISP3 = False
def utf8string(s):
if s is None:
return "None"
if ISP3:
return s
else: