Skip to content

Commit

Permalink
Partial fix for #3075.
Browse files Browse the repository at this point in the history
  • Loading branch information
dkocher committed Apr 5, 2009
1 parent fe86ab8 commit eedd0e8
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions source/ch/cyberduck/ui/cocoa/CDApplescriptabilityController.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,22 @@ public Object performDefaultImplementation() {
log.debug("Received URL from Apple Event:" + arg);
final Host h = Host.parse(arg);
if(StringUtils.isNotEmpty(h.getDefaultPath())) {
final Session s = SessionFactory.createSession(h);
final Path p = PathFactory.createPath(s, h.getDefaultPath(), Path.FILE_TYPE);
if(!h.getDefaultPath().endsWith(Path.DELIMITER)) {
final Session s = SessionFactory.createSession(h);
final Path p = PathFactory.createPath(s, h.getDefaultPath(), Path.FILE_TYPE);
// final AttributedList<AbstractPath> list = p.list();
// // Determine if listable directory
// if(!list.attributes().isReadable()) {
if(StringUtils.isNotBlank(p.getExtension())) {
CDMainApplication.invoke(new DefaultMainAction() {
public void run() {
CDTransferController.instance().startTransfer(new DownloadTransfer(p));
}
});
return null;
}
if(StringUtils.isNotBlank(p.getExtension())) {
CDMainApplication.invoke(new DefaultMainAction() {
public void run() {
CDTransferController.instance().startTransfer(new DownloadTransfer(p));
}
});
return null;
}
// }
}
}
CDBrowserController doc = ((CDMainController) NSApplication.sharedApplication().delegate()).newDocument();
doc.mount(h);
Expand Down

0 comments on commit eedd0e8

Please sign in to comment.