summaryrefslogtreecommitdiffstats
path: root/src/com.gluster.storage.management.gui
diff options
context:
space:
mode:
authorShireesh Anjal <shireesh@gluster.com>2011-06-16 20:06:05 +0530
committerShireesh Anjal <shireesh@gluster.com>2011-06-16 20:06:05 +0530
commitcaa39e03f14368dbe0c34a00862480b85d1a6236 (patch)
treec124dfa17f571634a53e6bff9feaf0d316dde8fa /src/com.gluster.storage.management.gui
parent2fff45c027063d1fe9a5151c19744728c320a36d (diff)
Bug 2898 - Trying to cancel the log download window throws error message
Diffstat (limited to 'src/com.gluster.storage.management.gui')
-rw-r--r--src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/actions/DownloadVolumeLogsAction.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/actions/DownloadVolumeLogsAction.java b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/actions/DownloadVolumeLogsAction.java
index 8de8aa2d..0f9ae5c6 100644
--- a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/actions/DownloadVolumeLogsAction.java
+++ b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/actions/DownloadVolumeLogsAction.java
@@ -59,13 +59,13 @@ public class DownloadVolumeLogsAction extends AbstractActionDelegate {
FileDialog dialog = new FileDialog(getShell(), SWT.SAVE);
dialog.setFilterNames(new String[] {"GZipped Tar (*.tar.gz)"});
dialog.setFilterExtensions(new String[] {"*.tar.gz"});
- dialog.open();
+ String filePath = dialog.open();
- String title = "Download Volume Logs [" + volume.getName() + "]";
- String filePath = dialog.getFilterPath() + File.separator + dialog.getFileName();
- if(!filePath.endsWith(".tar.gz")) {
- filePath += ".tar.gz";
+ if(filePath == null) {
+ return;
}
+
+ String title = "Download Volume Logs [" + volume.getName() + "]";
try {
client.downloadLogs(volume.getName(), filePath);
showInfoDialog(title, "Volume logs downloaded successfully to [" + filePath + "]");