--- a/src/internfile/internfile.cpp
+++ b/src/internfile/internfile.cpp
@@ -124,6 +124,16 @@
 
     LOGDEB(("FileInterner::getEnclosing() after: [%s]\n", eipath.c_str()));
     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