* Bug #13471 fixed - Infinite loop in ilib_build_jar used on an empty dir
[scilab.git] / scilab / modules / dynamic_link / macros / ilib_build_jar.sci
index 0c56911..aeae565 100644 (file)
@@ -20,6 +20,9 @@ function ilib_build_jar(jarFilePath, packageNames, sourcePaths, classPaths, mani
     // Returns all the java source files contained in a path tree
     function javaFilePaths = findJavaFiles(path, javaFilePaths)
         fileNames = listfiles(path)';
+        if (isempty(fileNames)) then
+            return;
+        end
         filePaths = fullfile(path, fileNames);
 
         // First, explore sub directories