View Single Post
Old 02-07-2026, 06:59 AM   #3
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,787
Karma: 24088595
Join Date: Dec 2010
Device: Kindle PW2
I was able to reproduce the problem. It's caused by the period in the file name.
I'll try to upload a fixed version today.

Update: The plugin assumes that writer2xhtml will create an output file with the base name without an extension and .epub.

However, writer2xhtml uses this code to remove the extension:

Code:
    public static final String getFileExtension(String sURL) {
    	String sFileName = getFileName(sURL);
    	int nDot = sFileName.lastIndexOf('.');
    	if (nDot>=0) {
    		return sFileName.substring(nDot);
    	}
    	else {
    		return "";
    	}
    }

    public static final String removeExtension(String sURL) {
    	String sExt = getFileExtension(sURL);
    	return sURL.substring(0, sURL.length()-sExt.length());
    }
I don't know Java, but the code apparently generates the output file name demo 1.epub if the input file name is demo 1.4.odt instead of demo 1.4.epub. Since the plugin can't find demo 1.4.epub it assumes that the conversion has failed and returns -1.

Last edited by Doitsu; 02-07-2026 at 08:37 AM.
Doitsu is offline   Reply With Quote