saving contiki relative paths if possible

This commit is contained in:
fros4943 2008-09-18 14:04:45 +00:00
parent c1af172035
commit ff08a99b7d
2 changed files with 6 additions and 3 deletions

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: MspMoteType.java,v 1.6 2008/06/27 14:09:26 nifi Exp $
* $Id: MspMoteType.java,v 1.7 2008/09/18 14:04:45 fros4943 Exp $
*/
package se.sics.cooja.mspmote;
@ -956,6 +956,7 @@ public abstract class MspMoteType implements MoteType {
// Source file
if (fileSource != null) {
element = new Element("source");
fileSource = GUI.stripAbsoluteContikiPath(fileSource);
element.setText(fileSource.getPath());
config.add(element);
element = new Element("command");
@ -964,6 +965,7 @@ public abstract class MspMoteType implements MoteType {
} else {
// ELF file
element = new Element("elf");
fileELF = GUI.stripAbsoluteContikiPath(fileELF);
element.setText(fileELF.getPath());
config.add(element);
}

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: MspCodeWatcher.java,v 1.11 2008/04/23 13:49:29 fros4943 Exp $
* $Id: MspCodeWatcher.java,v 1.12 2008/09/18 14:05:00 fros4943 Exp $
*/
package se.sics.cooja.mspmote.plugins;
@ -465,7 +465,8 @@ public class MspCodeWatcher extends VisPlugin {
if (codeFile != null) {
element = new Element("codefile");
element.setText(codeFile.getAbsolutePath());
codeFile = GUI.stripAbsoluteContikiPath(codeFile);
element.setText(codeFile.getPath());
config.add(element);
}