Skip to content

Commit

Permalink
Revert. Always create parent local directories. Fix #7365.
Browse files Browse the repository at this point in the history
Former-commit-id: 4062b407f4ddc3314232dd416325d42c23edb06c
  • Loading branch information
dkocher committed Jul 23, 2013
1 parent ba8ad49 commit a615bff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
Expand Up @@ -191,6 +191,7 @@ public void transfer(final Path file, final TransferOptions options, final Trans
else if(file.attributes().isFile()) {
session.message(MessageFormat.format(Locale.localizedString("Downloading {0}", "Status"),
file.getName()));
local.getParent().mkdir();
session.download(file, bandwidth, new AbstractStreamListener() {
// Only update the file custom icon if the size is > 5MB. Otherwise creating too much
// overhead when transferring a large amount of files
Expand Down
10 changes: 2 additions & 8 deletions source/ch/cyberduck/ui/cocoa/BrowserController.java
Expand Up @@ -426,9 +426,7 @@ private void updateQuickLookSelection(final List<Path> selected) {
if(!path.attributes().isFile()) {
continue;
}
final Local file = TemporaryFileServiceFactory.get().create(session.getHost().getUuid(), path);
file.getParent().mkdir();
path.setLocal(file);
path.setLocal(TemporaryFileServiceFactory.get().create(session.getHost().getUuid(), path));
downloads.add(path);
}
if(downloads.size() > 0) {
Expand Down Expand Up @@ -2703,11 +2701,7 @@ public void downloadButtonClicked(final ID sender) {
* @param downloads Paths to transfer
*/
public void download(List<Path> downloads) {
final Local folder = session.getHost().getDownloadFolder();
if(!folder.exists()) {
folder.mkdir();
}
this.download(downloads, folder);
this.download(downloads, session.getHost().getDownloadFolder());
}

/**
Expand Down

0 comments on commit a615bff

Please sign in to comment.