1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 22:22:11 +02:00

Bug 430313 - [remote] Auto Remote Debug - Unable to download to folder

Change-Id: I5b798435a11a97cb0e5195494455104867d12b8d
Signed-off-by: Alvaro Sanchez-Leon <alvsan09@gmail.com>
Reviewed-on: https://git.eclipse.org/r/23735
Tested-by: Hudson CI
Reviewed-by: Teodor Madan <teodor.madan@freescale.com>
IP-Clean: Teodor Madan <teodor.madan@freescale.com>
Tested-by: Teodor Madan <teodor.madan@freescale.com>
This commit is contained in:
Alvaro Sanchez-Leon 2014-03-26 16:02:54 -04:00 committed by Teodor Madan
parent 98e690291a
commit af6a81e33d

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2006, 2011 PalmSource, Inc. and others.
* Copyright (c) 2006, 2014 PalmSource, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -21,6 +21,7 @@
* Anna Dushistova (Mentor Graphics) - [318052] [remote launch] Properties are not saved/used
* Anna Dushistova (MontaVista) - [375067] [remote] Automated remote launch does not support project-less debug
* Dan Ungureanu (Freescale) - [428367] [remote launch] Fix missing title for Properties dialog
* Alvaro Sanchez-Leon (Ericsson) - [430313] [remote] Auto Remote Debug - Unable to download to folder
*******************************************************************************/
package org.eclipse.cdt.launch.remote.tabs;
@ -326,7 +327,18 @@ public class RemoteCDSFMainTab extends CMainTab {
Object retObj = dlg.getSelectedObject();
if (retObj instanceof IRemoteFile) {
IRemoteFile selectedFile = (IRemoteFile) retObj;
remoteProgText.setText(selectedFile.getAbsolutePath());
String absPath = selectedFile.getAbsolutePath();
if (selectedFile.isDirectory()) {
// The user selected a destination folder to upload the binary
// Append the Program name as the default file destination
IPath appPath = new Path(fProgText.getText().trim());
String lastSegment = appPath.lastSegment();
if (lastSegment != null && lastSegment.trim().length() > 0) {
IPath remotePath = new Path(selectedFile.getAbsolutePath()).append(lastSegment.trim());
absPath = remotePath.toPortableString();
}
}
remoteProgText.setText(absPath);
}
}