Commit 02e806df authored by Radek Ošlejšek's avatar Radek Ošlejšek
Browse files

Fix paths with white spaces

parent 33171446
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
#!/bin/bash

java -jar target/kypo2csv-0.0.1.jar $@
 No newline at end of file
java -jar target/kypo2csv-0.0.1.jar "$@"
+6 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ import cz.muni.csirt.kypo.events.EventsComparator;
import cz.muni.csirt.kypo.events.sandbox.Command;
import cz.muni.csirt.kypo.events.trainings.*;
import org.apache.commons.cli.*;
import org.springframework.util.StringUtils;

import java.io.*;
import java.nio.file.Files;
@@ -50,7 +51,12 @@ public class Application {
            formatter.printHelp("kypo2csv", options);
            System.exit(1);
        }

        String dir = cmd.getOptionValue("dir");
        if (! new File(dir).exists()) {
            System.err.println("The directory doesn't exist: " + dir);
            System.exit(2);
        }

        ObjectMapper mapper = new ObjectMapper();
        List<Command> sandboxEvents = readJSONs(mapper, dir+SANDBOX_EVENTS_DIR, Command.class);