Commit 76ef2d31 authored by Claes Sjofors's avatar Claes Sjofors

Java command open url added .html on .shtml links

parent 2c1bef29
...@@ -916,6 +916,8 @@ System.out.println( "JopSpiderCmd start"); ...@@ -916,6 +916,8 @@ System.out.println( "JopSpiderCmd start");
if ( name.substring(0,5).equals("http:")) { if ( name.substring(0,5).equals("http:")) {
url_str = name; url_str = name;
if ( url_str.lastIndexOf(".html") == -1 && if ( url_str.lastIndexOf(".html") == -1 &&
url_str.lastIndexOf(".shtml") == -1 &&
url_str.lastIndexOf(".htm") == -1 &&
url_str.lastIndexOf(".pdf") == -1) url_str.lastIndexOf(".pdf") == -1)
url_str = url_str + ".html"; url_str = url_str + ".html";
} }
...@@ -930,6 +932,8 @@ System.out.println( "JopSpiderCmd start"); ...@@ -930,6 +932,8 @@ System.out.println( "JopSpiderCmd start");
if ( idx1 != -1 && current_str.length() > idx1 + 1) { if ( idx1 != -1 && current_str.length() > idx1 + 1) {
url_str = current_str.substring(0,idx1 + 1) + "pwr_doc/" + name.substring(9); url_str = current_str.substring(0,idx1 + 1) + "pwr_doc/" + name.substring(9);
if ( url_str.lastIndexOf(".html") == -1 && if ( url_str.lastIndexOf(".html") == -1 &&
url_str.lastIndexOf(".shtml") == -1 &&
url_str.lastIndexOf(".htm") == -1 &&
url_str.lastIndexOf(".pdf") == -1) url_str.lastIndexOf(".pdf") == -1)
url_str = url_str + ".html"; url_str = url_str + ".html";
} }
...@@ -946,6 +950,8 @@ System.out.println( "JopSpiderCmd start"); ...@@ -946,6 +950,8 @@ System.out.println( "JopSpiderCmd start");
idx = idx2; idx = idx2;
String path = current_str.substring(0,idx + 1); String path = current_str.substring(0,idx + 1);
if ( name.lastIndexOf(".html") == -1 && if ( name.lastIndexOf(".html") == -1 &&
name.lastIndexOf(".shtml") == -1 &&
name.lastIndexOf(".htm") == -1 &&
name.lastIndexOf(".pdf") == -1) name.lastIndexOf(".pdf") == -1)
url_str = new String( path + name + ".html"); url_str = new String( path + name + ".html");
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment