several fixes

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7383 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 14 years ago
parent 0ac7311a62
commit 94c48500cc

@ -94,6 +94,7 @@ public class SMBLoader {
String u = url.toNormalform(true, true); String u = url.toNormalform(true, true);
List<String> list = new ArrayList<String>(); List<String> list = new ArrayList<String>();
for (String s: l) { for (String s: l) {
if (s.startsWith(".")) continue;
if (!s.endsWith("/") && !s.endsWith("\\")) { if (!s.endsWith("/") && !s.endsWith("\\")) {
// check if this is a directory // check if this is a directory
SmbFile sf = new SmbFile(u + s); SmbFile sf = new SmbFile(u + s);

@ -1002,7 +1002,7 @@ public class MultiProtocolURI implements Serializable, Comparable<MultiProtocolU
*/ */
public SmbFile getSmbFile() throws MalformedURLException { public SmbFile getSmbFile() throws MalformedURLException {
if (!isSMB()) throw new UnsupportedOperationException(); if (!isSMB()) throw new UnsupportedOperationException();
String url = this.toNormalform(false, true); String url = unescape(this.toNormalform(false, true));
return new SmbFile(url); return new SmbFile(url);
} }

@ -175,12 +175,12 @@ public class RSSMessage implements Hit {
public long getSize() { public long getSize() {
String size = Token.size.valueFrom(this.map); String size = Token.size.valueFrom(this.map);
return (size == null) ? 0 : Long.parseLong(size); return (size == null || size.length() == 0) ? 0 : Long.parseLong(size);
} }
public String getFulltext() { public String getFulltext() {
StringBuilder sb = new StringBuilder(300); StringBuilder sb = new StringBuilder(300);
for (String s: map.values()) sb.append(s).append(" "); for (String s: map.values()) sb.append(s).append(' ');
return sb.toString(); return sb.toString();
} }

Loading…
Cancel
Save