Removed original config.lua file, before the simulation one is integrated
This commit is contained in:
		@@ -12,4 +12,3 @@ color4=string.char(tonumber(green2*0.2), 0, 0)
 | 
				
			|||||||
colorBg=string.char(0,0,0) -- black is the default background color
 | 
					colorBg=string.char(0,0,0) -- black is the default background color
 | 
				
			||||||
sntpserverhostname="ptbtime1.ptb.de"
 | 
					sntpserverhostname="ptbtime1.ptb.de"
 | 
				
			||||||
timezoneoffset=1
 | 
					timezoneoffset=1
 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -93,9 +93,16 @@ public class WS2812Simulation implements LuaSimulation {
 | 
				
			|||||||
							if (args.length >= 3) {
 | 
												if (args.length >= 3) {
 | 
				
			||||||
								File additionalFile = new File(args[2]);
 | 
													File additionalFile = new File(args[2]);
 | 
				
			||||||
								if (additionalFile.exists() && (simu.doFile != null)) {
 | 
													if (additionalFile.exists() && (simu.doFile != null)) {
 | 
				
			||||||
 | 
														File targetFile = new File(simu.doFile.getWorkingDirectory()
 | 
				
			||||||
									Files.copy(additionalFile.toPath(), new File(simu.doFile.getWorkingDirectory()
 | 
																+ File.separator + additionalFile.getName());
 | 
				
			||||||
											+ File.separator + additionalFile.getName()).toPath());
 | 
														if (targetFile.exists()) {
 | 
				
			||||||
 | 
															if (targetFile.delete()) {
 | 
				
			||||||
 | 
																System.out.println("Removed original " + targetFile.getName() + "");
 | 
				
			||||||
 | 
															} else {
 | 
				
			||||||
 | 
																System.err.println("Cannot removed original " + targetFile.getName() + "");
 | 
				
			||||||
 | 
															}
 | 
				
			||||||
 | 
														}
 | 
				
			||||||
 | 
														Files.copy(additionalFile.toPath(), targetFile.toPath());
 | 
				
			||||||
									System.out.println("Integrate " + additionalFile.getName() + " into simulation");
 | 
														System.out.println("Integrate " + additionalFile.getName() + " into simulation");
 | 
				
			||||||
								} else {
 | 
													} else {
 | 
				
			||||||
									System.err.println("Script " + args[2] + " cannot be found");
 | 
														System.err.println("Script " + args[2] + " cannot be found");
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user