Fix cache bug when spaces are in the file path

This commit is contained in:
ME1312 2018-04-07 16:42:09 -04:00
parent 74ddbc9bd4
commit 69bb3d299a
20 changed files with 6 additions and 6 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -161,7 +161,7 @@ public class InternalSubCreator extends SubCreator {
try {
System.out.println(name + File.separator + "Creator > Launching " + template.getBuildOptions().getRawString("Shell-Location"));
thread.set(Runtime.getRuntime().exec((System.getProperty("os.name").toLowerCase().indexOf("win") >= 0)?"cmd.exe /c \"\"" + gitBash + "\" --login -i -c \"bash " + template.getBuildOptions().getRawString("Shell-Location") + ' ' + version.toString() + " \"" + ((cache == null)?':':cache.toString().replace('\\', '/')) + "\"\"\"":("bash " + template.getBuildOptions().getRawString("Shell-Location") + ' ' + version.toString() + " \"" + ((cache == null)?':':cache.toString()) + '\"'), null, dir));
thread.set(Runtime.getRuntime().exec((System.getProperty("os.name").toLowerCase().indexOf("win") >= 0)?"cmd.exe /c \"\"" + gitBash + "\" --login -i -c \"bash " + template.getBuildOptions().getRawString("Shell-Location") + ' ' + version.toString() + ' ' + ((cache == null)?':':cache.toString().replace('\\', '/').replace(" ", "\\ ")) + "\"\"":("bash " + template.getBuildOptions().getRawString("Shell-Location") + ' ' + version.toString() + ' ' + ((cache == null)?':':cache.toString().replace(" ", "\\ "))), null, dir));
thread.name().log.set(host.plugin.config.get().getSection("Settings").getBoolean("Log-Creator"));
thread.name().file = new File(dir, "SubCreator-" + template.getName() + "-" + version.toString().replace(" ", "@") + ".log");
thread.name().process = thread.get();

View File

@ -60,7 +60,7 @@ public final class SubPlugin extends BungeeCord implements Listener {
public SubServer sudo = null;
//public static final Version version = new Version("2.13a");
//public static final Version version = new Version(new Version("2.13a"), Version.VersionType.BETA, 1); // TODO Beta Version Setting
public static final Version version = new Version(new Version(new Version("2.13a"), VersionType.PRE_RELEASE, 2), VersionType.BETA, 7); // TODO Beta Version Setting
public static final Version version = new Version(new Version(new Version("2.13a"), VersionType.PRE_RELEASE, 2), VersionType.BETA, 8); // TODO Beta Version Setting
public boolean redis = false;
public long resetDate = 0;

Binary file not shown.

View File

@ -47,7 +47,7 @@ public final class SubPlugin extends JavaPlugin {
super();
//version = new Version(getDescription().getVersion());
//version = new Version(new Version(getDescription().getVersion()), Version.VersionType.BETA, 1); // TODO Beta Version Setting
version = new Version(new Version(new Version(getDescription().getVersion()), VersionType.PRE_RELEASE, 2), VersionType.BETA, 7); // TODO Beta Version Setting
version = new Version(new Version(new Version(getDescription().getVersion()), VersionType.PRE_RELEASE, 2), VersionType.BETA, 8); // TODO Beta Version Setting
}
/**

Binary file not shown.

View File

@ -53,7 +53,7 @@ public final class ExHost {
//public final Version version = new Version("2.13a");
//public final Version version = new Version(new Version("2.13a"), Version.VersionType.BETA, 1); // TODO Beta Version Setting
public final Version version = new Version(new Version(new Version("2.13a"), VersionType.PRE_RELEASE, 2), VersionType.BETA, 7); // TODO Beta Version Setting
public final Version version = new Version(new Version(new Version("2.13a"), VersionType.PRE_RELEASE, 2), VersionType.BETA, 8); // TODO Beta Version Setting
public final SubAPI api = new SubAPI(this);
private ConsoleReader jline;

View File

@ -289,7 +289,7 @@ public class SubCreator {
try {
thread.name().logger.info.println("Launching " + template.getBuildOptions().getRawString("Shell-Location"));
host.subdata.sendPacket(new PacketOutExLogMessage(address, "Launching " + template.getBuildOptions().getRawString("Shell-Location")));
thread.set(Runtime.getRuntime().exec((System.getProperty("os.name").toLowerCase().indexOf("win") >= 0)?"cmd.exe /c \"\"" + gitBash + "\" --login -i -c \"bash " + template.getBuildOptions().getRawString("Shell-Location") + ' ' + version.toString() + " \"" + ((cache == null)?':':cache.toString().replace('\\', '/')) + "\"\"\"":("bash " + template.getBuildOptions().getRawString("Shell-Location") + ' ' + version.toString() + " \"" + ((cache == null)?':':cache.toString()) + '\"'), null, dir));
thread.set(Runtime.getRuntime().exec((System.getProperty("os.name").toLowerCase().indexOf("win") >= 0)?"cmd.exe /c \"\"" + gitBash + "\" --login -i -c \"bash " + template.getBuildOptions().getRawString("Shell-Location") + ' ' + version.toString() + ' ' + ((cache == null)?':':cache.toString().replace('\\', '/').replace(" ", "\\ ")) + "\"\"":("bash " + template.getBuildOptions().getRawString("Shell-Location") + ' ' + version.toString() + ' ' + ((cache == null)?':':cache.toString().replace(" ", "\\ "))), null, dir));
thread.name().file = new File(dir, "SubCreator-" + template.getName() + "-" + version.toString().replace(" ", "@") + ".log");
thread.name().process = thread.get();
thread.name().start();

Binary file not shown.

View File

@ -50,7 +50,7 @@ public final class SubPlugin extends BungeeCord implements Listener {
public SubDataClient subdata = null;
//public static final Version version = new Version("2.13a");
//public static final Version version = new Version(new Version("2.13a"), Version.VersionType.BETA, 1); // TODO Beta Version Setting
public static final Version version = new Version(new Version(new Version("2.13a"), VersionType.PRE_RELEASE, 2), VersionType.BETA, 7); // TODO Beta Version Setting
public static final Version version = new Version(new Version(new Version("2.13a"), VersionType.PRE_RELEASE, 2), VersionType.BETA, 8); // TODO Beta Version Setting
public long lastReload = -1;