trackeditor: fix file saving

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@8454 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: e5bd7f54e182f237678280a59b145cd54e9197af
Former-commit-id: d0808626916a81a546b459d67f37fe06131b7845
This commit is contained in:
iobyte 2022-09-06 04:15:11 +00:00
parent 0aad503a1e
commit 76c17c2ad2
2 changed files with 6 additions and 3 deletions

View file

@ -489,7 +489,9 @@ public class EditorFrame extends JFrame
// if (documentIsModified)
if (true)
{
String filename = Editor.getProperties().getPath() + sep + getTrackData().getHeader().getName() + ".prj.xml";
String filename = Editor.getProperties().getPath();
String trackname = filename.substring(filename.lastIndexOf(sep) + 1);
filename = filename + sep + trackname + ".prj.xml";
//System.out.println("saveProject writing : " + filename);
@ -2093,7 +2095,9 @@ public class EditorFrame extends JFrame
message("No track", "Nothing to export");
return;
}
String fileName = Editor.getProperties().getPath() + sep + getTrackData().getHeader().getName() + ".xml";
String fileName = Editor.getProperties().getPath();
String trackName = fileName.substring(fileName.lastIndexOf(sep) + 1);
fileName = fileName + sep + trackName + ".xml";
//System.out.println("exportTrack writing : " + fileName);

View file

@ -637,7 +637,6 @@ public class XmlWriter
tmp += "auto generated : by " + Editor.getProperties().title + "\n";
tmp += "version : " + Editor.getProperties().version + "\n";
tmp += "copyright : (C) 2005 by Charalampos Alexopoulos\n";
tmp += "email : \n";
return tmp;
}