Project archive can be password protected

This commit is contained in:
Laurent Clouet
2016-10-05 23:01:03 +02:00
parent 0afdd965ba
commit 28b257092a
6 changed files with 31 additions and 68 deletions

View File

@@ -674,11 +674,18 @@ public class Client {
renderer_path_file.mkdir();
// unzip the archive
ret = Utils.unzipFileIntoDirectory(renderer_archive, renderer_path);
ret = Utils.unzipFileIntoDirectory(renderer_archive, renderer_path, null);
if (ret != 0) {
this.gui.error("Client::prepareWorkingDirectory, error with Utils.unzipFileIntoDirectory of the renderer (returned " + ret + ")");
return -1;
}
try {
File f = new File(ajob.getRendererPath());
f.setExecutable(true);
}
catch (SecurityException e) {
}
}
String scene_archive = ajob.getSceneArchivePath();
@@ -694,7 +701,7 @@ public class Client {
scene_path_file.mkdir();
// unzip the archive
ret = Utils.unzipFileIntoDirectory(scene_archive, scene_path);
ret = Utils.unzipFileIntoDirectory(scene_archive, scene_path, ajob.getSceneArchivePassword());
if (ret != 0) {
this.gui.error("Client::prepareWorkingDirectory, error with Utils.unzipFileIntoDirectory of the scene (returned " + ret + ")");
return -2;