git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6796 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
low012 15 years ago
parent 67ec58d8e7
commit dc93cec3a8

@ -729,17 +729,17 @@ public class DigestURI implements Serializable {
} else if (isFile()) { } else if (isFile()) {
defaultPort = true; defaultPort = true;
} }
final String path = this.getFile(excludeReference, removeSessionID); final String urlPath = this.getFile(excludeReference, removeSessionID);
if (defaultPort) { if (defaultPort) {
return return
this.protocol + "://" + this.protocol + "://" +
((this.getHost() == null) ? "" : ((this.userInfo != null) ? (this.userInfo + "@") : ("")) + this.getHost().toLowerCase()) + ((this.getHost() == null) ? "" : ((this.userInfo != null) ? (this.userInfo + "@") : ("")) + this.getHost().toLowerCase()) +
path; urlPath;
} }
return this.protocol + "://" + return this.protocol + "://" +
((this.userInfo != null) ? (this.userInfo + "@") : ("")) + ((this.userInfo != null) ? (this.userInfo + "@") : ("")) +
this.getHost().toLowerCase() + ((defaultPort) ? ("") : (":" + this.port)) + path; this.getHost().toLowerCase() + ((defaultPort) ? ("") : (":" + this.port)) + urlPath;
} }
/* (non-Javadoc) /* (non-Javadoc)
@ -1112,11 +1112,12 @@ public class DigestURI implements Serializable {
return false; return false;
} }
public boolean canExecute() { // commented out since the canExecute() method is not part of java 1.5
if (isFile()) return getFSFile().canExecute(); // public boolean canExecute() {
if (isSMB()) return false; // no execute over smb // if (isFile()) return getFSFile().canExecute();
return false; // if (isSMB()) return false; // no execute over smb
} // return false;
// }
public boolean isHidden() { public boolean isHidden() {
if (isFile()) return getFSFile().isHidden(); if (isFile()) return getFSFile().isHidden();
@ -1213,14 +1214,16 @@ public class DigestURI implements Serializable {
} }
public MultiProtocolInputStream(SmbFile sf) throws IOException { public MultiProtocolInputStream(SmbFile sf) throws IOException {
/* TODO: Forward Exception instead of String containing message once
* YaCy is ported to Java 1.6 some day. */
try { try {
this.is = new SmbFileInputStream(sf); this.is = new SmbFileInputStream(sf);
} catch (SmbException e) { } catch (SmbException e) {
throw new IOException(e); throw new IOException(e.getMessage());
} catch (MalformedURLException e) { } catch (MalformedURLException e) {
throw new IOException(e); throw new IOException(e.getMessage());
} catch (UnknownHostException e) { } catch (UnknownHostException e) {
throw new IOException(e); throw new IOException(e.getMessage());
} }
} }

Loading…
Cancel
Save