// First we check if all the required files are there.
CRequiredFiles requiredFiles = getRequiredFilesWsInput();
CFileDependencies fileDependencies = getFileDependencies();
if (requiredFiles != null) {
CFileCheckResult fileCheckResult = deployer.checkRequiredFiles(user, password, fileDependencies,
requiredFiles);
if (Thread.currentThread().isInterrupted()) {
callback.cancelled();
return;
}
if (fileCheckResult.getFileCheckStatus() != 0) {
// We need to send the data for some files.
AddRequiredFilesWithContent(fileCheckResult.getAvailableRequiredFiles());
fileCheckResult = deployer.checkRequiredFiles(user, password, fileDependencies, requiredFiles);
if (Thread.currentThread().isInterrupted()) {
callback.cancelled();
return;
}
if (fileCheckResult.getFileCheckStatus() != 0) {
callback.caught(new DeployException("Failed to upload all required files. "
+ "The server says that some files are missing but we don't "
+ "have them to send. This is most likely a bug, please report it"));
return;
}