From 11b77ec48eb92fcbc5153dc7075006f37509ab02 Mon Sep 17 00:00:00 2001 From: David Kocher Date: Fri, 6 Sep 2013 10:11:35 +0000 Subject: [PATCH] Always add filename to detail message when available. Fix #7429. Former-commit-id: 8454db6b1a4053a5996b067f41267d13bcdefbfc --- .../cyberduck/core/AbstractIOExceptionMappingService.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/ch/cyberduck/core/AbstractIOExceptionMappingService.java b/source/ch/cyberduck/core/AbstractIOExceptionMappingService.java index 05143aebf5e..d3eccae7772 100644 --- a/source/ch/cyberduck/core/AbstractIOExceptionMappingService.java +++ b/source/ch/cyberduck/core/AbstractIOExceptionMappingService.java @@ -35,9 +35,11 @@ public BackgroundException map(final String message, final T failure) { return exception; } - public BackgroundException map(final String message, final T failure, final Path directory) { + public BackgroundException map(final String message, final T failure, final Path file) { final BackgroundException exception = this.map(failure); - exception.setMessage(MessageFormat.format(StringUtils.chomp(LocaleFactory.localizedString(message, "Error")), directory.getName())); + exception.setMessage(String.format("%s (%s)", + MessageFormat.format(StringUtils.chomp(LocaleFactory.localizedString(message, "Error")), file.getName()), + file.getName())); return exception; }