Ver código fonte

Merge branch 'master' of https://git.tk.informatik.tu-darmstadt.de/carlos.garcia/praktikum-holons

dominik.rieder 7 anos atrás
pai
commit
a162cbe898
1 arquivos alterados com 2 adições e 3 exclusões
  1. 2 3
      src/ui/controller/SaveController.java

+ 2 - 3
src/ui/controller/SaveController.java

@@ -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);