Skip to content
Snippets Groups Projects
Commit 98fad56b authored by carlosuc3m's avatar carlosuc3m
Browse files

correct bug for when there are no engines installed

parent 8bfc443a
No related branches found
No related tags found
No related merge requests found
......@@ -100,6 +100,8 @@ public class DeepLearningVersionDownloader
* @return string array with folder names inside the engines folder
*/
public static String[] getEnginePaths() {
if (!downloadsPath.toFile().exists())
return new String[0];
return downloadsPath.toFile().list();
}
......
......@@ -151,6 +151,8 @@ public class AvailableDeepLearningVersions
*/
public static List<DeepLearningVersion> loadDownloaded()
{
if (DeepLearningVersionDownloader.getEnginePaths().length == 0)
return new ArrayList<DeepLearningVersion>();
List<DeepLearningVersion> versions = Arrays.stream(DeepLearningVersionDownloader.getEnginePaths())
.map(t -> {
try {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment