try {
if (!file.startsWith("/")) {
protocol.cdHome();
file = protocol.pwd().getPath() + "/" + file;
}
return new RemoteSiteFile(file, isDir, null);
} catch (Exception e) {
throw new ProtocolException("Failed to create protocol for " + file
+ " : " + e.getMessage());
}
}