|
@@ -271,7 +271,6 @@ public class SaveController {
|
|
|
*/
|
|
|
private void storeData(ArchiveOutputStream stream) throws IOException {
|
|
|
// TODO Auto-generated method stub
|
|
|
- System.out.println(System.getProperty("user.home"));
|
|
|
File images = new File(System.getProperty("user.home") + "/HolonGUI/Images");
|
|
|
File background = new File(System.getProperty("user.home") + "/HolonGUI/BackgroundImages");
|
|
|
addFilesToSave(images, stream);
|
|
@@ -428,9 +427,9 @@ public class SaveController {
|
|
|
*/
|
|
|
private void addFileToSave(File src, ArchiveOutputStream stream, boolean dir) throws IOException {
|
|
|
String entryName = (dir == true ? src.getCanonicalPath() : src.getName());
|
|
|
- entryName = entryName.replace("C:", "");
|
|
|
+ String partition = entryName.substring(0, entryName.indexOf(":"));
|
|
|
+ entryName = entryName.replace(partition, "");
|
|
|
entryName = entryName.replace(System.getProperty("user.home") + "/HolonGUI/", "");
|
|
|
-
|
|
|
|
|
|
ZipArchiveEntry entry = new ZipArchiveEntry(entryName);
|
|
|
stream.putArchiveEntry(entry);
|