Arrange so we can now open the parent of a document (e.g. chm file instead of temp copy of html page inside chm), even when the parent is itself embedded in an archive

This commit is contained in:
Jean-Francois Dockes
2012-10-12 16:54:52 +02:00
parent 382ae1f718
commit 5add2e2384
13 changed files with 222 additions and 59 deletions
+10
View File
@@ -126,6 +126,16 @@ bool FileInterner::getEnclosing(const string &url, const string &ipath,
return true;
}
string FileInterner::getLastIpathElt(const string& ipath)
{
string::size_type sep;
if ((sep = ipath.find_last_of(cstr_isep)) != string::npos) {
return ipath.substr(sep + 1);
} else {
return ipath;
}
}
// Uncompress input file into a temporary one, by executing the appropriate
// script.
static bool uncompressfile(RclConfig *conf, const string& ifn,
+3
View File
@@ -83,6 +83,9 @@ class FileInterner {
static bool getEnclosing(const string &url, const string &ipath,
string &eurl, string &eipath, string& udi);
/** Return last element in ipath, like basename */
static std::string getLastIpathElt(const std::string& ipath);
/** Constructors take the initial step to preprocess the data object and
* create the top filter */