parent
5a9e7228ae
commit
bad9544c58
|
@ -80,8 +80,11 @@ public class PublicationsRetrieverPlugin {
|
||||||
|
|
||||||
File curAssignmentsDirs = new File(FileUtils.storeDocFilesDir);
|
File curAssignmentsDirs = new File(FileUtils.storeDocFilesDir);
|
||||||
try {
|
try {
|
||||||
if ( ! curAssignmentsDirs.mkdirs() ) // Create the subdirectory. It may return "false", in case it already exists (will not happen, unless there is problem in cleaning up of the subdirectories) or any problem occurred.
|
if ( !curAssignmentsDirs.exists() ) {
|
||||||
throw new RuntimeException("Could not create the \"assignments_" + assignmentRequestCounter + "_fullTexts\" directories: \"" + FileUtils.storeDocFilesDir + "\"!");
|
if ( !curAssignmentsDirs.mkdirs() ) // Try to create the directory(-ies) if they don't exist. If they exist OR if sth went wrong, the result is the same: "false".
|
||||||
|
throw new RuntimeException("Could not create the \"" + currentAssignmentsSubDir + "\" directories: \"" + FileUtils.storeDocFilesDir + "\"!");
|
||||||
|
} else
|
||||||
|
logger.warn("The curAssignmentsDirs: \"" + currentAssignmentsSubDir + "\" already exist! Probably left behind by a previous execution..");
|
||||||
} catch (Exception e) { // Mainly a SecurityException.
|
} catch (Exception e) { // Mainly a SecurityException.
|
||||||
throw new RuntimeException("Failed to create the full-texts directory for assignments_" + assignmentRequestCounter + ": " + e.getMessage());
|
throw new RuntimeException("Failed to create the full-texts directory for assignments_" + assignmentRequestCounter + ": " + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class GeneralController {
|
||||||
|
|
||||||
String finalMsg = "";
|
String finalMsg = "";
|
||||||
if ( shouldShutdownWorker )
|
if ( shouldShutdownWorker )
|
||||||
finalMsg = "The worker has already received a \"shutdownWorker\" (which was not canceled afterwards). ";
|
finalMsg = "The worker has already received a \"shutdownWorker\" request (which was not canceled afterwards). ";
|
||||||
else
|
else
|
||||||
shouldShutdownWorker = true;
|
shouldShutdownWorker = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue