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:
@@ -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,
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user