Skip to content

Commit

Permalink
Fix #7628.
Browse files Browse the repository at this point in the history
Former-commit-id: eee44c9308b6b1cc100d7d66999f80fb06905d13
  • Loading branch information
dkocher committed Nov 25, 2013
1 parent f80716a commit 5bda755
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions source/ch/cyberduck/core/Host.java
Expand Up @@ -504,8 +504,11 @@ public String getNickname() {
* @return The default given name of this bookmark
*/
private String getDefaultNickname() {
if(StringUtils.isNotEmpty(hostname)) {
return hostname + " \u2013 " + protocol.getName();
if(StringUtils.isNotBlank(hostname)) {
if(StringUtils.isNotBlank(credentials.getUsername())) {
return String.format("%s@%s \u2013 %s", credentials.getUsername(), hostname, protocol.getName());
}
return String.format("%s \u2013 %s", hostname, protocol.getName());
}
return StringUtils.EMPTY;
}
Expand Down

0 comments on commit 5bda755

Please sign in to comment.