rem: String directory = (last_slash >= 0 ? file.substring(0, last_slash) : "");
add: String directory = (last_slash >= 0 ? file.substring(0, last_slash) : String());
context: update_odir(int o, String file, ErrorHandler *errh){    assert(o >= 0 && o < NUMODIR);#if HAVE_KPATHSEA    if (file.find_left('/') < 0)	file = odir[o] + "/" + file;    // exit if this directory was not found via kpathsea, or the file is not    // in the kpathsea directory    if (!file_in_kpathsea_odir(o, file))	return;    assert(writable_texdir && writable_texdir.length() <= odir[o].length()	   && memcmp(file.data(), writable_texdir.data(), writable_texdir.length()) == 0);    // divide the filename into portions    // file == writable_texdir + directory + file    file = file.substring(writable_texdir.length());    while (file && file[0] == '/')	file = file.substring(1);    int last_slash = file.find_right('/');    String directory = (last_slash >= 0 ? file.substring(0, last_slash) : "");    file = file.substring(last_slash >= 0 ? last_slash + 1 : 0);    if (!file)			// no filename to update	return;    // return if nocreate    if (nocreate) {	errh->message("would update %sls-R for %s/%s", writable_texdir.c_str(), directory.c_str(), file.c_str());	return;    } else if (verbose)	errh->message("updating %sls-R for %s/%s", writable_texdir.c_str(), directory.c_str(), file.c_str());        // try to update ls-R ourselves, rather than running mktexupd --    // mktexupd's runtime is painful: a half second to update a file    String ls_r = writable_texdir + "ls-R";    bool success = false;    if (access(ls_r.c_str(), R_OK) >= 0) // make sure it already exists	if (FILE *f = fopen(ls_r.c_str(), "a")) {	    fprintf(f, "./%s:\n%s\n", directory.c_str(), file.c_str());	    success = true;	    fclose(f);	}    // otherwise, run mktexupd    if (!success && writable_texdir.find_left('\'') < 0 && directory.find_left('\'') < 0 && file.find_left('\'') < 0) {	// look for mktexupd script	if (!mktexupd_tried) {	    mktexupd = kpsei_string(kpsei_find_file("mktexupd", KPSEI_FMT_WEB2C));	    mktexupd_tried = true;	}	// run script	if (mktexupd) {	    String command = mktexupd + " '" + writable_texdir + directory + "' '" + file + "'";	    int retval = system(command.c_str());	    if (retval == 127)		errh->error("could not run '%s'", command.c_str());	    else if (retval < 0)		errh->error("could not run '%s': %s", command.c_str(), strerror(errno));	    else if (retval != 0)		errh->error("'%s' failed", command.c_str());	}    }#else    (void) file, (void) errh;#endif}