From d927649350a62ec12a45deeb8ef55d6cb804343d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anian=20B=C3=BChler?= <anian.buehler@reutlingen-university.de> Date: Tue, 9 Nov 2021 17:10:07 +0100 Subject: [PATCH] changed "/" to File.separatorChar --- .../java/edu/mit/blocks/workspace/ContextMenu.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/edu/mit/blocks/workspace/ContextMenu.java b/src/main/java/edu/mit/blocks/workspace/ContextMenu.java index f84ba02..9367402 100644 --- a/src/main/java/edu/mit/blocks/workspace/ContextMenu.java +++ b/src/main/java/edu/mit/blocks/workspace/ContextMenu.java @@ -218,7 +218,7 @@ public class ContextMenu extends PopupMenu implements ActionListener { try { InputStream input = getClass().getResourceAsStream(cssResource); if(input != null) { - cssFile = new File(tempPath +"/"+ "_seitenformatierung.css"); + cssFile = new File(tempPath +File.separatorChar+ "_seitenformatierung.css"); OutputStream out = new FileOutputStream(cssFile); int read; byte[] bytes = new byte[1024]; @@ -241,7 +241,7 @@ public class ContextMenu extends PopupMenu implements ActionListener { try { InputStream input = getClass().getResourceAsStream(htmlResource); if(input != null) { - htmlFile = new File(tempPath +"/"+ blockGenusName + ".html"); + htmlFile = new File(tempPath +File.separatorChar+ blockGenusName + ".html"); OutputStream out = new FileOutputStream(htmlFile); int read; byte[] bytes = new byte[1024]; @@ -264,7 +264,7 @@ public class ContextMenu extends PopupMenu implements ActionListener { try { InputStream input = getClass().getResourceAsStream(logoResource); if(input != null) { - logoFile = new File(tempPath +"/_Logo_LGI_page.png"); + logoFile = new File(tempPath +File.separatorChar+"_Logo_LGI_page.png"); OutputStream out = new FileOutputStream(logoFile); int read; byte[] bytes = new byte[10000]; @@ -285,7 +285,7 @@ public class ContextMenu extends PopupMenu implements ActionListener { try { InputStream input = getClass().getResourceAsStream(imageResource); if(input != null) { - imageFile = new File(tempPath +"/"+ blockGenusName+".png"); + imageFile = new File(tempPath +File.separatorChar+ blockGenusName+".png"); OutputStream out = new FileOutputStream(imageFile); int read; byte[] bytes = new byte[10000]; @@ -306,7 +306,7 @@ public class ContextMenu extends PopupMenu implements ActionListener { /* try { InputStream input = getClass().getResourceAsStream(exampleResource); if(input != null) { - exampleFile = new File(tempPath +"/"+ blockGenusName+"-beispiel.png"); + exampleFile = new File(tempPath +File.separatorChar+ blockGenusName+"-beispiel.png"); OutputStream out = new FileOutputStream(exampleFile); int read; byte[] bytes = new byte[10000]; @@ -333,7 +333,7 @@ public class ContextMenu extends PopupMenu implements ActionListener { while(!allFilesRead) { InputStream input = getClass().getResourceAsStream(example2Resource + exampleImageCounter + exampleFileType); if(input != null) { - example2File = new File(tempPath +"/"+ blockGenusName+"-beispiel-"+exampleImageCounter+".png"); + example2File = new File(tempPath +File.separatorChar+ blockGenusName+"-beispiel-"+exampleImageCounter+".png"); OutputStream out = new FileOutputStream(example2File); int read; byte[] bytes = new byte[10000]; -- GitLab